#include <bits/stdc++.h>
const int maxn = 2e5 + 5;
const long long mod = 1e9 + 7;
using namespace std;
char s[maxn];
long long ci(long long x, long long t) {
  long long res = 1;
  while (t) {
    if (t & 1) res *= x;
    t >>= 1;
    x *= x;
  }
  return res;
}
long long dd(int x) {
  long long res = 0;
  while (x) {
    if (x % 2) res++;
    x /= 2;
  }
  return 6 - res;
}
long long ans = 1;
int main() {
  scanf("%s", s + 1);
  int len = strlen(s + 1);
  for (int i = 1; i <= len; i++) {
    if (s[i] >= '0' && s[i] <= '9')
      ans *= ci(3LL, dd(s[i] - '0')), ans %= mod;
    else if (s[i] >= 'A' && s[i] <= 'Z')
      ans *= ci(3LL, dd(s[i] - 'A' + 10)), ans %= mod;
    else if (s[i] >= 'a' && s[i] <= 'z')
      ans *= ci(3LL, dd(s[i] - 'a' + 36)), ans %= mod;
    else if (s[i] == '-')
      ans *= 3LL, ans %= mod;
  }
  printf("%lld\n", ans);
  return 0;
}
