#include <bits/stdc++.h>
std::map<char, int> map;
char str[100010];
int result;
void check(int num) {
  for (int i = 0; i < 6; i++)
    if ((num & (1 << i)) == 0) result++;
}
int main(void) {
  for (int i = 0; i <= 9; i++) map[i + '0'] = i;
  for (int i = 0; i <= 'Z' - 'A'; i++) map[i + 'A'] = 10 + i;
  for (int i = 0; i <= 'z' - 'a'; i++) map[i + 'a'] = 36 + i;
  map['-'] = 62, map['_'] = 63;
  scanf("%s", str);
  for (int i = 0; str[i] != '\0'; i++) check(map[str[i]]);
  long long r = 1;
  for (int i = 0; i < result; i++) r = (r * 3) % 1000000007;
  printf("%lld\n", r);
  return 0;
}
