#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n, m;
  cin >> n >> m;
  vector<int> dp(n + 1, 0);
  dp[0] = 1;
  dp[1] = 1;
  for (int i = 0; i < m; ++i) {
    int xx;
    cin >> xx;
    dp[xx] = -1;
  }
  int MOD = 1000000007;
  for (int i = 1; i <= n; ++i) {
    if (dp[i] < 0) {
      dp[i] = 0;
      continue;
    }
    dp[i] = dp[i - 1] + dp[i - 2];
    dp[i] %= MOD;
  }
  for (int i = 1; i <= n; ++i) cout << i << "," << dp[i] << endl;
  cout << dp[n] << endl;
  return 0;
}
