#include <bits/stdc++.h>
using namespace std;
unsigned long long modExponentiate(unsigned long long a, unsigned long long b) {
  if (b == 0) return 1;
  unsigned long long ans = a;
  unsigned long long t = 1;
  while (b > 1) {
    if (b % 2 == 0) {
      ans = (ans * ans) % (1000000007);
      a = (a * a) % 1000000007;
      b = b / 2;
    } else {
      t = (t * a) % 1000000007;
      b = b - 1;
    }
  }
  return (t * ans) % 1000000007;
}
int noofz(int a) {
  int no = 0;
  while (a > 0) {
    if ((a % 2) == 1) no++;
    a = a / 2;
  }
  return (6 - no);
}
int main() {
  map<char, int> m;
  for (int i = 0; i < 10; i++) m[(char)('0' + i)] = noofz(i);
  for (int i = 10; i < 36; i++) m[(char)('A' + i - 10)] = noofz(i);
  for (int i = 36; i < 62; i++) m[(char)('a' + i - 36)] = noofz(i);
  m['-'] = noofz(62);
  m['_'] = noofz(63);
  char str[100001];
  cin >> str;
  long long ans = 1LL;
  long long anslog = 0LL;
  for (int i = 0; i < strlen(str); i++) {
    anslog = anslog + m[str[i]];
  }
  ans = modExponentiate(3, anslog);
  cout << ans << endl;
  return 0;
}
