# coding: utf-8
# Your code here!
N,M=map(int,input().split())
l=list(range(N+1))

res=[1,1]
for i in range(10**5):
    res.append(res[-1]+res[-2])

sum=1
start=0
judge=True

for i in range(M):
    a=int(input())
    if (a-start)==1:
        if start==0:
            pass
        else:
            judge=False
            break
    sum*=res[a-start-1]
    print(sum)
    start=a+1
sum*=res[N-start]

if judge:    
    print(sum%(10**9+7))
else:
    print(0)