#include <bits/stdc++.h>
#pragma GCC optimize("O2")
using namespace std;
string s;
long long ss[80];
bool viz[80];
long long sol = 1;
int findnr(char x) {
  if (x == '-') return 62;
  if (x == '_') return 63;
  if (x <= '9') return (x - '0');
  if (x <= 'Z') return 10 + (x - 'A');
  if (x <= 'z') return 36 + (x - 'a');
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> s;
  for (int i = 0; i < s.size(); ++i) {
    int q = findnr(s[i]);
    if (viz[q])
      sol = (sol * ss[q]) % 1000000007;
    else {
      for (int a = 0; a <= 63; ++a)
        for (int b = 0; b <= 63; ++b) {
          int x = (a & b);
          if (x == q) ++ss[q];
        }
      viz[q] = 1;
      sol = (sol * ss[q]) % 1000000007;
    }
  }
  cout << sol;
  return 0;
}
