#include <bits/stdc++.h>
using namespace std;
const long long P = 1000000007;
long long ans = 1;
int l, i, x, j;
char s[100010];
int idx(char c) {
  if ('0' <= c && c <= '9') return c - '0';
  if ('A' <= c && c <= 'Z') return c - 'A' + 10;
  if ('a' <= c && c <= 'z') return c - 'a' + 36;
  if (c == '-') return 62;
  if (c == '_') return 63;
  return 0;
}
int main() {
  scanf("%s", s);
  l = strlen(s);
  for (i = 0; i < l; i++) {
    x = idx(s[i]);
    for (j = 0; j < 6; j++)
      if (!(x & (1 << j))) ans = ans * 3 % P;
  }
  printf("%I64d\n", ans);
  return 0;
}
