#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 10;
long long test, n, m, k, x, y, z, l, ans, a[N], b[N], c[N], mod = 1e9 + 7;
long long power(long long a, long long n) {
  if (n == 0) return 1;
  long long p = power(a, n / 2) % mod;
  p = (p * p) % mod;
  if (n & 1) p = (p * a) % mod;
  return p;
}
long long f(int k) {
  int cnt = 0;
  for (int i = 0; i <= 5; i++)
    if (((k >> i) & 1) == 0) cnt++;
  return cnt;
}
string s;
void solve() {
  cin >> s;
  n = s.size();
  long long ans = 1;
  for (int i = 0; s[i]; i++) {
    int num;
    if (s[i] >= '0' && s[i] <= '9') num = (s[i] & 15);
    if (s[i] >= 'A' && s[i] <= 'Z') num = (s[i] & 31) + 9;
    if (s[i] >= 'a' && s[i] <= 'z') num = (s[i] & 31) + 35;
    if (s[i] == '-') num = 62;
    if (s[i] == '_') num = 63;
    (ans *= power(3, __builtin_popcount((num ^ 63)))) %= mod;
  }
  cout << ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
}
