#include <bits/stdc++.h>
using namespace std;
bool qf = false;
map<char, long long> a;
long long i, j;
map<long long, long long> b;
long long len, ans = 1;
char c[100001];
int main() {
  for (i = 0; i < 10; i++) a[i + '0'] = i;
  for (i = 0; i < 26; i++) a[i + 'A'] = i + 10;
  for (i = 0; i < 26; i++) a[i + 'a'] = i + 36;
  a['-'] = 62;
  a['_'] = 63;
  for (i = 0; i < 64; i++)
    for (j = 0; j < 64; j++) b[i & j]++;
  scanf(" %s", c);
  len = strlen(c);
  for (i = 0; i < len; i++) {
    ans *= b[a[c[i]]];
    ans %= 1000000007;
  }
  printf("%lld", ans);
  return 0;
}
