#include <bits/stdc++.h>
using namespace std;
const int N = 64;
const long long int mod = 1e9 + 7;
long long int dp[N];
int main() {
  for (int i = 0; i < N; i++) dp[i] = 0;
  for (int i = 0; i < N; i++)
    for (int j = 0; j < N; j++)
      for (int k = 0; k < N; k++)
        if ((j & k) == i) dp[i]++;
  long long int ans = 1;
  string s;
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    int x;
    char ch = s[i];
    if (ch >= '0' and ch <= '9')
      x = ch - '0';
    else if (ch >= 'A' and ch <= 'Z')
      x = ch - 'A' + 10;
    else if (ch >= 'a' and ch <= 'z')
      x = ch - 'a' + 36;
    else if (ch == '-')
      x = 62;
    else if (ch == '_')
      x = 63;
    ans *= dp[x];
    if (ans >= mod) ans %= mod;
  }
  printf("%lld\n", ans);
  return 0;
}
