#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const double eps = 1e-8;
const long long mod = 1e9 + 7;
map<char, int> mp;
int cnt[65];
void init() {
  for (int i = 0; i < 10; i++) {
    mp[i + '0'] = i;
  }
  for (int i = 0; i < 26; i++) {
    mp[i + 'A'] = 10 + i;
  }
  for (int i = 0; i < 26; i++) {
    mp[i + 'a'] = 36 + i;
  }
  mp['-'] = 62;
  mp['_'] = 63;
  for (int i = 0; i < 64; i++) {
    for (int j = 0; j < 64; j++) {
      cnt[i & j]++;
    }
  }
}
int main() {
  string s;
  cin >> s;
  init();
  long long ans = 1;
  for (int i = 0; i < s.size(); i++) {
    ans = (ans * cnt[mp[s[i]]]) % mod;
  }
  cout << ans << endl;
}
