#include <bits/stdc++.h>
using namespace std;
const unsigned long long DIVIDE = 1000000007;
int countOfZeroBit(char c) {
  int n, a;
  n = 0;
  a = 0;
  if (c >= '0' && c <= '9') {
    n = c - '0';
  } else if (c >= 'A' && c <= 'Z') {
    n = (c - 'A') + 10;
  } else if (c >= 'a' && c <= 'z') {
    n = (c - 'a') + 36;
  } else if (c == '-') {
    return 1;
  } else if (c == '_') {
    return 0;
  }
  if ((n & 1) == 0) a++;
  if ((n & 2) == 0) a++;
  if ((n & 4) == 0) a++;
  if ((n & 8) == 0) a++;
  if ((n & 16) == 0) a++;
  if ((n & 32) == 0) a++;
  return a;
}
unsigned long long solve(string& str) {
  unsigned long long answer;
  int i, n;
  answer = 1;
  for (i = 0; i < str.size(); i++) {
    n = countOfZeroBit(str[i]);
    while (n--) {
      answer = (answer * 3) % DIVIDE;
    }
  }
  return answer;
}
int main(int argc, const char* argv[]) {
  string str;
  cin >> str;
  cout << solve(str) << "\n";
  return 0;
}
