#include <bits/stdc++.h>
using namespace std;
string s;
const int K = 6;
const int MOD = 1e9 + 7;
int chrToInt(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;
  return 63;
}
bool getBit(int x, int i) { return ((x & (1 << i)) > 0 ? true : false); }
int main() {
  cin >> s;
  int n = s.size();
  long long ans = 1;
  for (int i = n - 1; i >= 0; i--) {
    int x = chrToInt(s[i]);
    for (int j = 0; j < K; j++) {
      if (!getBit(x, j)) ans = (ans * 3) % MOD;
    }
  }
  cout << ans << endl;
  return 0;
}
