#include <bits/stdc++.h>
using namespace std;
const long double PI = 3.141592653589793238462643383279502884L;
const long double E = 2.718281828459045235360287471352662498L;
const long double EPS = 1e-12L;
int64_t a[64];
int64_t r;
int n;
int64_t mod = 1000000007;
string s;
int b[100240];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.precision(11);
  cout.setf(ios::fixed);
  fill(a, a + 64, 0);
  for (int i = 0; i < 64; ++i) {
    for (int j = 0; j < 64; ++j) {
      ++a[i & j];
    }
  }
  cin >> s;
  n = s.size();
  for (int i = 0; i < n; ++i) {
    if ('0' <= s[i] && s[i] <= '9') {
      b[i] = s[i] - '0';
    } else if ('A' <= s[i] && s[i] <= 'Z') {
      b[i] = 10 + (s[i] - 'A');
    } else if ('a' <= s[i] && s[i] <= 'z') {
      b[i] = 36 + (s[i] - 'a');
    } else if (s[i] == '-') {
      b[i] = 62;
    } else if (s[i] == '_') {
      b[i] = 63;
    }
  }
  r = 1;
  for (int i = 0; i < n; ++i) {
    r *= a[b[i]];
    r %= mod;
  }
  cout << r << endl;
  return 0;
}
