#include <bits/stdc++.h>
using namespace std;
const int maxn = 262144;
const long long modn = 1e9 + 7;
void read(int &x) {
  x = 0;
  int f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  x = x * f;
}
char s[maxn];
long long ans[64], anss, tmp, tot;
int main() {
  for (int i = 1; i <= 63; i++) ans[i] = ans[i >> 1] + (i & 1);
  scanf("%s", s);
  int l = strlen(s);
  for (int i = 0; i < l; i++) {
    tmp = -1;
    if ('0' <= s[i] && s[i] <= '9') tmp = s[i] - '0';
    if ('A' <= s[i] && s[i] <= 'Z') tmp = s[i] - 'A' + 10;
    if ('a' <= s[i] && s[i] <= 'z') tmp = s[i] - 'a' + 36;
    if (s[i] == '-') tmp = 62;
    if (tmp == -1) tmp = 63;
    tot += ans[tmp ^ 63];
  }
  anss = 1;
  for (int i = 1; i <= tot; i++) anss = (anss * 3) % modn;
  printf("%lld", anss);
  return 0;
}
