#include <bits/stdc++.h>
using namespace std;
const long long linf = 1e18 + 9;
const int inf = 1e9 + 9;
const long long mod = 1e9 + 7;
const int N = 1e5 + 9;
long long h[N], cnt[N], ans;
char str[N];
int main() {
  scanf("%s", str);
  for (int i = '0'; i <= '9'; i++) h[i] = i - '0';
  for (int i = 'a'; i <= 'z'; i++) h[i] = i - 'a' + 36;
  for (int i = 'A'; i <= 'Z'; i++) h[i] = i - 'A' + 10;
  h['-'] = 62;
  h['_'] = 63;
  for (long long i = 0; i < 64; i++)
    for (long long j = 0; j < 64; j++) cnt[i & j]++;
  long long tt = strlen(str);
  ans = 1;
  for (int i = 0; i < tt; i++) ans = (ans * cnt[h[str[i]]]) % mod;
  printf("%lld\n", ans);
  return 0;
}
