#include <bits/stdc++.h>
using namespace std;
char a[100010], aa;
int main() {
  long long ans, i, k, kk, lp, gs, j, tot, cnt, p[10], la, cf;
  scanf("%s", a);
  la = strlen(a);
  ans = 1LL;
  for (i = 0; i < la; i++) {
    aa = a[i];
    if (aa >= '0' && aa <= '9')
      k = aa - '0';
    else if (aa >= 'A' && aa <= 'Z')
      k = aa - 'A' + 10;
    else if (aa >= 'a' && aa <= 'z')
      k = aa - 'a' + 36;
    else if (aa == '-')
      k = 62;
    else
      k = 63;
    kk = k;
    memset(p, 0, sizeof(p));
    lp = 0;
    while (kk > 0) {
      p[++lp] = kk % 2;
      kk /= 2;
    }
    gs = 0;
    for (j = 1; j <= 6; j++)
      if (p[j] == 0) gs++;
    for (j = 1; j <= gs; j++) ans = (ans * 3LL) % 1000000007;
  }
  printf("%I64d", ans);
  return 0;
}
