#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
const long long mod = 1e9 + 7;
int n, m, a[10];
long long pre[100];
char ss[maxn];
map<char, int> mp;
void init() {
  int t = 0;
  for (char i = '0'; i <= '9'; i++, t++) {
    mp[i] = t;
  }
  for (char i = 'A'; i <= 'Z'; i++, t++) {
    mp[i] = t;
  }
  for (char i = 'a'; i <= 'z'; i++, t++) {
    mp[i] = t;
  }
  mp['-'] = 62, mp['_'] = 63;
  for (int i = 0; i <= 63; i++)
    for (int j = 0; j <= 63; j++) pre[i & j]++;
  return;
}
int main() {
  init();
  scanf("%s", ss + 1);
  int l = strlen(ss + 1);
  long long res = 1;
  for (int i = 1; i <= l; i++) {
    res = (res * pre[mp[ss[i]]]) % mod;
  }
  cout << res << endl;
  return 0;
}
