#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
string s;
int f(char ch) {
  if (ch >= '0' && ch <= '9')
    return ch - '0';
  else if (ch >= 'A' && ch <= 'Z')
    return ch - 'A' + 10;
  else if (ch >= 'a' && ch <= 'z')
    return ch - 'a' + 36;
  else if (ch == '-')
    return 62;
  else if (ch == '_')
    return 63;
}
int main() {
  while (cin >> s) {
    long long ans = 1;
    for (int i = 0; i < s.size(); i++) {
      int t = f(s[i]);
      for (int j = 0; j < 6; j++)
        if (!((t >> j) & 1)) ans = ans * 3 % mod;
    }
    cout << ans << endl;
  }
}
