#include <bits/stdc++.h>
using namespace std;
long long val[100005], po[100005];
string s;
long long mod = 1000000007;
int main() {
  ios::sync_with_stdio(false);
  for (int i = 0; i < 10; i++) val[i + '0'] = i;
  for (int i = 0; i < 26; i++) val['A' + i] = 10 + i;
  for (int i = 0; i < 26; i++) val['a' + i] = 36 + i;
  val['-'] = 62;
  val['_'] = 63;
  cin >> s;
  int n = s.size();
  po[0] = 1;
  for (int i = 1; i <= 100003; i++) po[i] = (po[i - 1] * 3) % mod;
  long long ans = 1;
  for (int i = 0; i < n; i++) {
    long long x = val[s[i]];
    int cnt = 0, c = 0;
    while (c < 6) {
      if (x % 2 == 0) cnt++;
      x /= 2;
      c++;
    }
    ans = (ans * po[cnt]) % mod;
  }
  cout << ans << endl;
}
