#include <bits/stdc++.h>
const long long maxn = 1e6 + 9, modn = 1e9 + 7;
using namespace std;
long long n, k, ans = 1;
string s;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> s;
  for (long long i = 0; i < s.size(); i++) {
    long long x;
    if (s[i] >= '0' && s[i] <= '9') x = (s[i] - '0');
    if (s[i] >= 'A' && s[i] <= 'Z') x = s[i] - 55;
    if (s[i] >= 'a' && s[i] <= 'z') x = s[i] - 61;
    if (s[i] == '-') x = 62;
    if (s[i] == '_') x = 63;
    ans *= pow(3, 6 - (__builtin_popcount(x)));
    ans %= modn;
  }
  cout << (ans + modn) % modn;
  return 0;
}
