#include <bits/stdc++.h>
using namespace std;
void YAHIA() {
  ios::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
}
int main() {
  YAHIA();
  int mod = (int)1e9 + 7;
  long long ans = 1;
  string s;
  map<char, int> mp;
  cin >> s;
  for (int i = 0; i < (int)10; i++) mp[i + '0'] = i;
  for (int i = 0; i < (int)26; i++) mp[i + 'A'] = i + 10;
  for (int i = 0; i < (int)26; i++) mp[i + 'a'] = i + 36;
  mp['-'] = 62, mp['_'] = 63;
  for (int i = 0; i < (int)((int)(s).size()); i++) {
    long long zeros = (6 - __builtin_popcount(mp[s[i]]));
    for (int j = 0; j < (int)zeros; j++) ans = (ans * 3) % mod;
  }
  cout << ans;
  return 0;
}
