#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> als(m);
  for (auto& a : als) cin >> a;
  als.push_back(n + 1);
  auto total = 1;
  auto aptr = 0, temp = 0;
  for (int i = 0; i < n; ++i) {
    cout << i << ": ";
    if (i == als[aptr]) {
      if (aptr < m - 1) ++aptr;
      continue;
    }
    temp = (i + 1 == als[aptr]) ? 0 : 1;
    if (i <= n - 2) {
      temp += (i + 2 == als[aptr] || i + 2 == als[aptr + 1]) ? 0 : 1;
    }
    cout << temp << endl;
    total = ((total % 1000000007) + temp) % 1000000007;
    if (total == 0) break;
  }
  cout << total << endl;
  return 0;
}
