#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  unordered_map<char, long long> um;
  char c;
  um['0'] = 0;
  um['1'] = 1;
  um['2'] = 2;
  um['3'] = 3;
  um['4'] = 4;
  um['5'] = 5;
  um['6'] = 6;
  um['7'] = 7;
  um['8'] = 8;
  um['9'] = 9;
  for (long long i = 10; i <= 35; i++) {
    c = 'A' + (i - 10);
    um[c] = i;
  }
  for (long long i = 36; i <= 61; i++) {
    c = 'a' + (i - 36);
    um[c] = i;
  }
  um['-'] = 62;
  um['_'] = 63;
  string s;
  cin >> s;
  long long temp;
  long long ans = 1;
  for (long long i = 0; i < s.length(); i++) {
    temp = um[s[i]];
    for (long long j = 0; j < 6; j++) {
      if (((1 << j) & temp) == 0) ans = (ans * 3) % 1000000007;
      ans = ans % 1000000007;
    }
  }
  cout << ans << "\n";
  return 0;
}
