#include <bits/stdc++.h>
using namespace std;
const int N = 100100;
int p(char z) {
  if ('0' <= z && z <= '9') return z - '0';
  if ('A' <= z && z <= 'Z') return z - 'A' + 10;
  if ('a' <= z && z <= 'z') return z - 'a' + 36;
  if (z == '-') return 62;
  if (z == '_') return 63;
  return 0;
}
void solve() {
  string s;
  long long k = 1;
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    int j = 6 - __builtin_popcount(p(s[i]));
    while (j--) {
      k *= 3;
      while (k >= (1e9 + 7)) k -= (1e9 + 7);
    }
  }
  cout << k;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
