#include <bits/stdc++.h>
using namespace std;
const int va = 100010;
const int mod = 1e9 + 7;
char s[va];
int l, a, cc;
long long ans;
int main() {
  scanf(" %s", s);
  l = strlen(s);
  for (int i = 0; i < l; i++) {
    if (s[i] >= '0' && s[i] <= '9')
      a = s[i] - '0';
    else if (s[i] >= 'A' && s[i] <= 'Z')
      a = s[i] - 'A' + 10;
    else if (s[i] >= 'a' && s[i] <= 'z')
      a = s[i] - 'a' + 36;
    else if (s[i] == '-')
      a = 62;
    else
      a = 63;
    for (int j = 0; j <= 5; j++) {
      if (((a >> j) & 1) == 0) cc++;
    }
  }
  ans = 1;
  for (int i = 1; i <= cc; i++) ans = ans * 3 % mod;
  printf("%I64d", ans);
  return 0;
}
