#include <bits/stdc++.h>
using namespace std;
long long get(char c) {
  if ('0' <= c && c <= '9') return c - '0';
  if ('A' <= c && c <= 'Z') return 10 + (c - 'A');
  if ('a' <= c && c <= 'z') return 36 + (c - 'a');
  if (c == '-') return 62;
  return 63;
}
int main() {
  string s;
  cin >> s;
  vector<long long> a(64, 0);
  int n = 64;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) {
      int t = i & j;
      a[t]++;
    }
  long long ans = 1, mod = 1e9 + 7;
  for (int i = 0; i < s.length(); i++) {
    int p = get(s[i]);
    ans = (ans * a[p]) % mod;
  }
  cout << ans;
  return 0;
}
