#include <bits/stdc++.h>
using namespace std;
int A[1000000];
map<char, int> M;
int main() {
  for (int i = 0; i <= 63; i++)
    for (int j = 0; j <= 63; j++) A[i & j]++;
  for (int i = 0; i <= 9; i++) M[i + '0'] = i;
  for (int i = 0; i < 26; i++) M[i + 'A'] = i + 10;
  for (int i = 0; i < 26; i++) M[i + 'a'] = i + 36;
  M['_'] = 63, M['-'] = 62;
  string s;
  cin >> s;
  long long ans = 1;
  long long mod = 1e9 + 7;
  for (int i = 0; i < s.size(); i++) ans = ans * A[M[s[i]]] % mod;
  cout << ans << endl;
  return 0;
}
