#include <bits/stdc++.h>
using namespace std;
int n, m, k;
long long pow(long long a, long long b) {
  long long x = 1, y = a;
  while (b > 0) {
    if (b % 2 == 1) {
      x = (x * y);
      if (x > 1000000007) x %= 1000000007;
    }
    y = (y * y);
    if (y > 1000000007) y %= 1000000007;
    b /= 2;
  }
  return x;
}
int main() {
  string str;
  cin >> str;
  int ctr = 0;
  for (int i = 0; i < str.size(); i++) {
    int n;
    if (str[i] >= '0' && str[i] <= '9')
      n = str[i] - '0';
    else if (str[i] >= 'A' && str[i] <= 'Z')
      n = str[i] - 'A' + 10;
    else if (str[i] >= 'a' && str[i] <= 'z')
      n = str[i] - 'a' + 36;
    else if (str[i] == '-')
      n = 62;
    else
      n = 63;
    for (int i = 0; i < 6; i++) {
      if ((n >> i & 1) == 0) ctr++;
    }
  }
  cout << pow(3, (long long)ctr) << endl;
  return 0;
}
