#include <bits/stdc++.h>
using namespace std;
long long m = 1000000007;
long long bigmod(long long b, long long p) {
  if (p == 0) return 1;
  if (p % 2 == 0) {
    long long t;
    t = bigmod(3, p / 2);
    return ((t % m) * (t % m)) % m;
  } else {
    long long t = bigmod(3, p - 1);
    return (b * (t % m)) % m;
  }
}
int main() {
  string s;
  while (cin >> s) {
    long long num = 0, c = 0;
    for (long long i = 0; i < s.length(); i++) {
      if (s[i] == '-')
        num = 62;
      else if (s[i] == '_')
        num = 63;
      else if ((int)(s[i]) >= 48 && (int)s[i] <= 57)
        num = (int)s[i] - 48;
      else if ((int)s[i] >= 65 && (int)s[i] <= 90)
        num = (int)s[i] - 65 + 10;
      else
        num = (int)s[i] - 97 + 36;
      for (long long j = 0; j < 6; j++) {
        long long t = ceil(pow(2, j));
        long long ret = (t & num);
        if (ret == 0) c++;
      }
    }
    cout << bigmod(3, c) << endl;
  }
  return 0;
}
