#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:167177216")
using namespace std;
const int MAX = 2147483647;
const int MAXN = 201000;
const long long MOD = 1000000000 + 7;
int main() {
  string s,
      s1 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_";
  cin >> s;
  map<int, int> a;
  for (int i = 0; i < 64; ++i)
    for (int j = 0; j < 64; ++j) a[i & j]++;
  long long ans = 1;
  for (int i = 0; i < s.length(); ++i) {
    ans = (ans * a[s1.find(s[i])]) % MOD;
  }
  cout << ans;
  return 0;
}
