#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
long long D[1020];
long long C[1020][1020];
char A[55][1010];
long long v[1010];
void solve() {
  for (int i = 0; i < 1010; i++) {
    C[i][0] = 1;
    for (int j = 1; j <= i; j++)
      C[i][j] = (C[i - 1][j - 1] + C[i - 1][j]) % MOD;
  }
  D[0] = D[1] = 1;
  for (int i = 2; i < 1010; i++) {
    for (int j = 1; j <= i; j++) {
      D[i] = (D[i] + D[i - j] * C[i - 1][j - 1]) % MOD;
    }
  }
  int m, n;
  scanf("%d%d", &m, &n);
  for (int i = 0; i < n; i++) scanf("%s", A[i]);
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (A[i][j] == '1') v[j] |= 1LL << i;
  map<long long, int> M;
  for (int i = 0; i < m; i++) M[v[i]]++;
  long long ans = 1;
  for (auto e : M) {
    ans = ans * D[e.second] % MOD;
  }
  printf("%lld\n", ans);
}
int main() {
  int Tc = 1;
  for (int tc = 1; tc <= Tc; tc++) {
    solve();
  }
  return 0;
}
