#include <bits/stdc++.h>
using namespace std;
long long cnt[64];
signed main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  string s;
  cin >> s;
  long long n = s.length();
  long long ans = 1;
  for (long long i = 0; i < 64; i++) {
    for (long long j = 0; j < 64; j++) {
      cnt[i & j]++;
    }
  }
  for (long long i = 0; i < n; i++) {
    char c = s[i];
    long long decode = 0;
    if (c <= '9' && c >= '0') {
      decode = c - '0';
    } else if (c <= 'Z' && c >= 'A') {
      decode += 10;
      decode += c - 'A';
    } else if (c <= 'z' && c >= 'a') {
      decode += 36;
      decode += c - 'a';
    } else if (c == '-') {
      decode = 62;
    } else {
      decode = 63;
    }
    ans *= cnt[decode], ans %= 1000000007;
  }
  cout << ans;
}
