#include <bits/stdc++.h>
using namespace std;
long long noOfUnsetBits(char c) {
  long long num;
  if (c >= '0' && c <= '9') {
    num = c - '0';
  } else if (c >= 'A' && c <= 'Z') {
    num = 10 + (c - 'A');
  } else if (c >= 'a' && c <= 'z') {
    num = 36 + (c - 'a');
  } else if (c == '-') {
    num = 62;
  } else if (c == '_') {
    num = 63;
  } else {
    assert(false);
  }
  long long unsetBits = 0;
  for (long long i = 0; i < 6; i++) {
    if ((num >> i) & 1) {
    } else {
      unsetBits++;
    }
  }
  return unsetBits;
}
const long long MOD = 1e9 + 7;
long long powerModulo(long long base, long long power) {
  long long res = 1;
  while (power) {
    if (power & 1) res = (res * base) % MOD;
    base = (base * base) % MOD;
    power >>= 1;
  }
  return res;
}
int32_t main() {
  string s;
  cin >> s;
  long long total_unset = 0;
  for (char c : s) total_unset += noOfUnsetBits(c);
  cout << powerModulo(3ll, total_unset) << "\n";
  return 0;
}
