#include <bits/stdc++.h>
using namespace std;
int cnt[65];
const int mod = 1e9 + 7;
char s[100010];
map<int, int> mp;
int change(char ch) {
  if (ch >= '0' && ch <= '9') return ch - '0';
  if (ch >= 'A' && ch <= 'Z') return ch - 'A' + 10;
  if (ch >= 'a' && ch <= 'z') return ch - 'a' + 36;
  if (ch == '-') return 62;
  if (ch == '_') return 63;
}
long long mypow(long long n, long long t) {
  long long ans = 1;
  while (t) {
    if (t % 2 == 1) ans = ans * n % mod;
    n = n * n % mod;
    t >>= 1;
  }
  return ans;
}
int main() {
  long long ans = 1;
  mp.clear();
  for (int i = 0; i <= 63; i++) {
    int num = 0;
    for (int j = 0; j <= 63; j++) {
      for (int k = 0; k <= 63; k++) {
        if ((j & k) == i) {
          num++;
        }
      }
    }
    cnt[i] = num;
  }
  scanf("%s", s);
  int len = strlen(s);
  for (int i = 0; i < len; i++) mp[change(s[i])]++;
  for (int i = 0; i <= 64; i++) {
    if (mp[i]) {
      ans = ans * mypow((long long)cnt[i], (long long)mp[i]) % mod;
    }
  }
  printf("%I64d\n", ans);
  return 0;
}
