#include <bits/stdc++.h>
int a[100010];
long long ans, cnt;
long long d[100];
int main() {
  int N;
  char s[100010];
  scanf("%s", s);
  N = strlen(s);
  for (int i = 0; i < N; i++) {
    if ('0' <= s[i] && s[i] <= '9') a[i] = s[i] - '0';
    if ('A' <= s[i] && s[i] <= 'Z') a[i] = s[i] - 'A' + 10;
    if ('a' <= s[i] && s[i] <= 'z') a[i] = s[i] - 'a' + 36;
    if (s[i] == '-') a[i] = 62;
    if (s[i] == '_') a[i] = 63;
  }
  ans = 1;
  for (int i = 0; i < 64; i++)
    for (int j = 0; j < 64; j++) {
      d[i & j]++;
    }
  for (int i = 0; i < N; i++) {
    cnt = 0;
    ans *= d[a[i]];
    ans %= 1000000007;
  }
  printf("%lld\n", ans);
  return 0;
}
