#include <bits/stdc++.h>
using namespace std;
long long int mod = 1000000007;
int main() {
  long long int a, b, c, d, e, f, i, j, p, q = 0, ans = 1;
  char s[100002];
  cin >> s;
  a = strlen(s);
  for (i = 0; i < a; i++) {
    if (s[i] >= '0' && s[i] <= '9') {
      f = s[i] - 48;
    } else if (s[i] >= 'A' && s[i] <= 'Z') {
      f = s[i] - 55;
    } else if (s[i] >= 'a' && s[i] <= 'z') {
      f = s[i] - 61;
    } else if (s[i] == '-')
      f = 62;
    else if (s[i] == '_')
      f = 63;
    e = f;
    q = 0;
    while (e != 0) {
      p = e % 2;
      q++;
      if (p == 0) {
        ans = (ans * 3) % mod;
      }
      e = e / 2;
    }
    if (q < 6) {
      while (q < 6) {
        ans = (ans * 3) % mod;
        q++;
      }
    }
  }
  cout << ans << endl;
  return 0;
}
