#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
int main() {
  string cad;
  cin >> cad;
  vector<int> data(cad.size());
  for (int i = 0; i < cad.size(); ++i) {
    if (cad[i] >= '0' && cad[i] <= '9') data[i] = cad[i] - '0';
    if (cad[i] >= 'A' && cad[i] <= 'Z') data[i] = cad[i] - 'A' + 10;
    if (cad[i] >= 'a' && cad[i] <= 'z') data[i] = cad[i] - 'a' + 36;
    if (cad[i] == '-') data[i] = 62;
    if (cad[i] == '_') data[i] = 63;
  }
  vector<long long> same(66);
  for (int i = 0; i < 64; ++i)
    for (int j = 0; j < 64; ++j) same[i & j]++;
  long long ans = 1;
  for (int i = 0; i < cad.size(); ++i)
    ans = ((ans % MOD) * (same[data[i]] % MOD)) % MOD;
  cout << ans << '\n';
  return 0;
}
