#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007LL;
map<char, int> mp;
char in[1000005];
long long pow_mod(long long a, long long n) {
  long long ans = 1;
  while (n) {
    if (n & 1) ans = ans * a % mod;
    a = a * a % mod;
    n >>= 1;
  }
  return ans;
}
int f(int x) {
  x = (~x) & ((1 << 6) - 1);
  int ans = 0;
  while (x) ans += x & 1, x >>= 1;
  return ans;
}
int main() {
  for (int i = 0; i <= 9; ++i) mp[i + '0'] = i;
  for (int i = 'A'; i <= 'Z'; ++i) mp[i] = i - 'A' + 10;
  for (int i = 'a'; i <= 'z'; ++i) mp[i] = i - 'a' + 36;
  mp['-'] = 62;
  mp['_'] = 63;
  int cnt = 0;
  gets(in);
  int x;
  for (char* p = in; *p; ++p) {
    x = mp[*p];
    cnt += f(x);
  }
  printf("%I64d\n", pow_mod(3, cnt));
  return 0;
}
