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