n,m = map(int,input().split())
a = [0]*m
for i in range(m):
    a[i] = int(input())
b=a[0]
for i in range(m-1):
    b = max(b,a[i+1]-a[i])
fib=[0,1]
for i in range(b-1):
    fib.append(fib[i]+fib[i+1])
ans = fib[a[0]]
for i in range(m-1):
    ans *= fib[a[i+1]-a[i]-1]
    ans % 1000000007
    print(ans)
ans *= fib[n-a[m-1]]
print(ans%1000000007)