#include <bits/stdc++.h>
using namespace std;
const int nmax = 2000100;
int n, m;
string s;
long long el[500];
void solve() {
  cin >> s;
  int l = s.length();
  long long k = 0;
  for (char i = '0'; i <= '9'; ++i) {
    el[i] = k;
    ++k;
  }
  for (char i = 'A'; i <= 'Z'; ++i) {
    el[i] = k;
    ++k;
  }
  for (char i = 'a'; i <= 'z'; ++i) {
    el[i] = k;
    ++k;
  }
  el['-'] = k;
  el['_'] = k + 1;
  long long pos = 0;
  long long mod = 1e+9 + 7;
  for (int i = 0; i < l; ++i) {
    long long kf = el[s[i]];
    for (int j = 0; j < 6; ++j) {
      pos += !(kf & (1 << j));
    }
  }
  long long ans = 1;
  while (pos) {
    ans = (ans * 3) % mod;
    --pos;
  }
  cout << ans;
}
int main() {
  int t = 1;
  for (int i = 0; i < t; ++i) {
    solve();
  }
}
