#include <bits/stdc++.h>
using namespace std;
int main() {
  string in, out;
  cin >> in;
  long long k;
  long long ans = 1;
  for (int i = 0; i < (int)in.length(); ++i) {
    if (in[i] == '-')
      k = 62;
    else if (in[i] == '_')
      k = 63;
    else if (isdigit(in[i])) {
      k = (in[i] - '0');
    } else if (isupper(in[i])) {
      k = (in[i] - 'A' + 10);
    } else if (islower(in[i])) {
      k = (in[i] - 'a' + 36);
    }
    bitset<6> b(k);
    for (int j = 0; j < 6; ++j) {
      if (!b[j]) {
        ans *= 3;
        ans %= 1000000007;
      }
    }
  }
  cout << ans;
  return 0;
}
