#include <bits/stdc++.h>
using namespace std;
long long MOD = 1000000007;
string s;
long long t[10000];
void stor() {
  int i, j, cnt;
  for (i = 0; i < 64; i++) {
    j = i;
    cnt = 0;
    while (j) {
      if (j % 2 == 1) {
        cnt++;
      }
      j = j / 2;
    }
    t[i] = cnt;
  }
}
int main() {
  stor();
  long long l, i, ss = 0, a, c;
  cin >> s;
  l = s.size();
  for (i = 0; i < l; i++) {
    if ((s[i] >= '0') && (s[i] <= '9')) {
      ss += 6 - t[s[i] - '0'];
    } else if ((s[i] >= 'A') && (s[i] <= 'Z')) {
      ss += 6 - t[s[i] - 'A' + 10];
    } else if ((s[i] >= 'a') && (s[i] <= 'z')) {
      ss += 6 - t[s[i] - 'a' + 36];
    } else if (s[i] == '-') {
      ss += 6 - t[62];
    } else if (s[i] == '_') {
      ss += 6 - t[63];
    }
  }
  a = 3;
  c = 1;
  while (ss) {
    if (ss % 2 == 1) {
      c = c * a;
      c = c % MOD;
    }
    ss = ss / 2;
    a = a * a;
    a = a % MOD;
  }
  cout << c << endl;
  return 0;
}
