#include <bits/stdc++.h>
using namespace std;
size_t popcount(size_t n) {
  std::bitset<sizeof(size_t) * CHAR_BIT> b(n);
  return b.count();
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  string s;
  cin >> s;
  long long ans = 1, MOD = 1000000000 + 7;
  for (int i = 0; i < s.size(); i++) {
    long long x;
    if (s[i] >= '0' && s[i] <= '9')
      x = s[i] - '0';
    else if (s[i] >= 'a' && s[i] <= 'z')
      x = s[i] - 'a' + 36;
    else if (s[i] >= 'A' && s[i] <= 'Z')
      x = s[i] - 'A' + 10;
    else if (s[i] == '-')
      x = 62;
    else
      x = 63;
    long long y = 6 - popcount(x), z = pow(3, y);
    ans = ((ans % MOD) * (z % MOD)) % MOD;
  }
  cout << ans << endl;
}
