#include <bits/stdc++.h>
using namespace std;
int main() {
  map<char, int> mp;
  for (char c = '0'; c <= '9'; c++) {
    mp[c] = c - '0';
  }
  for (char c = 'A'; c <= 'Z'; c++) {
    mp[c] = (c - 'A') + 10;
  }
  for (char c = 'a'; c <= 'z'; c++) {
    mp[c] = (c - 'a') + 36;
  }
  mp['-'] = 62;
  mp['_'] = 63;
  string s;
  cin >> s;
  long long int ans = 1;
  long long int mod = 1000000007;
  for (char c : s) {
    int x = mp[c];
    int cnt = __builtin_popcount(x);
    int dif = 6 - cnt;
    cnt = 1;
    while (dif--) {
      cnt *= 3;
    }
    long long int y = cnt;
    ans = (ans * y) % mod;
  }
  cout << ans << "\n";
  return 0;
}
