#include <bits/stdc++.h>
using namespace std;
const int MOD = (long long)1e9 + 7;
const int N = 1e5;
long long ans = 1;
string s;
int getNum(char c) {
  if ('0' <= c && c <= '9') return c - '0';
  if ('A' <= c && c <= 'Z') return 10 + c - 'A';
  if ('a' <= c && c <= 'z') return 36 + c - 'a';
  if (c == '-') return 62;
  if (c == '_') return 63;
}
int main() {
  cin >> s;
  int n = s.size();
  for (int i = 0; i < n; i++) {
    int x = getNum(s[i]);
    for (int k = 0; k < 6; k++)
      if (((x >> k) & 1) == 0) ans = (ans * 3) % MOD;
  }
  printf("%I64d\n", ans);
  return 0;
}
