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