#include <bits/stdc++.h>
using namespace std;
long long MOD = 1000000007;
void scan(int &x);
vector<int> vp;
long long int powermod(long long int _a, long long int _b, long long int _m) {
  long long int _r = 1;
  while (_b) {
    if (_b % 2 == 1) _r = (_r * _a) % _m;
    _b /= 2;
    _a = (_a * _a) % _m;
  }
  return _r;
}
int get(char c) {
  if (c >= '0' && c <= '9') return c - '0';
  if (c >= 'A' && c <= 'Z') return c - 'A' + 10;
  if (c >= 'a' && c <= 'z') return c - 'a' + 36;
  if (c == '-') return 62;
  if (c == '_') return 63;
}
char st[100003];
int tobin(int x) {
  int ans = 0, no1 = 0;
  while (x) {
    if (x & 1) no1++;
    x = x / 2;
  }
  return 6 - no1;
}
int main(void) {
  long long tot = 0;
  scanf("%s", st);
  for (int i = 0; st[i] != '\0'; i++) {
    int x = get(st[i]);
    int zero = tobin(x);
    tot += zero;
  }
  cout << powermod(3, tot, MOD);
  return 0;
}
void scan(int &x) {
  register int c = getchar();
  x = 0;
  int neg = 0;
  for (; ((c < 48 || c > 57) && c != '-'); c = getchar())
    ;
  if (c == '-') {
    neg = 1;
    c = getchar();
  }
  for (; c > 47 && c < 58; c = getchar()) {
    x = (x << 1) + (x << 3) + c - 48;
  }
  if (neg) x = -x;
}
