#include <bits/stdc++.h>
using namespace std;
map<char, int> simbol;
const int MOD = 1000 * 1000 * 1000 + 7;
int main() {
  vector<char> data;
  string s;
  cin >> s;
  for (char i = '0'; i <= '9'; i++) data.push_back(i);
  for (char i = 'A'; i <= 'Z'; i++) data.push_back(i);
  for (char i = 'a'; i <= 'z'; i++) data.push_back(i);
  data.push_back('-');
  data.push_back('_');
  long long ans = 1;
  for (int i = 0; i < data.size(); i++) {
    simbol[data[i]] = i;
  }
  for (int i = 0; i < s.length(); i++) {
    int k = simbol[s[i]];
    for (int j = 0; j < 6; j++) {
      if ((k & (1 << j)) == 0) {
        ans *= 3;
        ans %= MOD;
      }
    }
  }
  cout << ans << "\n";
}
