#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18 + 1;
inline long long input(void) {
  char t;
  long long x = 0;
  int neg = 0;
  t = getchar();
  while ((t < 48 || t > 57) && t != '-') t = getchar();
  if (t == '-') {
    neg = 1;
    t = getchar();
  }
  while (t >= 48 && t <= 57) {
    x = (x << 3) + (x << 1) + t - 48;
    t = getchar();
  }
  if (neg) x = -x;
  return x;
}
inline void output(long long x) {
  char a[20];
  int i = 0, j;
  a[0] = '0';
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  if (x == 0) putchar('0');
  while (x) {
    a[i++] = x % 10 + 48;
    x /= 10;
  }
  for (j = i - 1; j >= 0; j--) {
    putchar(a[j]);
  }
  putchar('\n');
}
char s[1000010];
int main() {
  long long n, ans = 1, x;
  scanf("%s", s);
  n = strlen(s);
  for (int i = 0; i < n; ++i) {
    if (s[i] <= '9' && s[i] >= '0')
      x = s[i] - '0';
    else if (s[i] <= 'Z' && s[i] >= 'A')
      x = s[i] - 'A' + 10;
    else if (s[i] <= 'z' && s[i] >= 'a')
      x = s[i] - 'a' + 36;
    else if (s[i] == '-')
      x = 62;
    else
      x = 63;
    for (int j = 0; j < 6; ++j) {
      if (x % 2 == 0) ans *= 3;
      x /= 2;
    }
    ans %= 1000000007;
  }
  output(ans);
  return 0;
}
