#include <bits/stdc++.h>
using namespace std;
string a;
long long b[305];
int main() {
  string s;
  cin >> s;
  for (char i = '0'; i <= '9'; i++) a.push_back(i);
  for (char i = 'A'; i <= 'Z'; i++) a.push_back(i);
  for (char i = 'a'; i <= 'z'; i++) a.push_back(i);
  a.push_back('-');
  a.push_back('_');
  for (long long i = 0; i < 64; i++) {
    b[a[i]] = i;
  }
  long long ans = 1;
  for (long long i = 0; i < s.size(); i++) {
    long long val = b[s[i]];
    for (long long j = 0; j < 6; j++) {
      if ((val & (1 << j)) == 0) {
        ans = (ans * 3) % 1000000007;
      }
    }
  }
  cout << ans;
}
