#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  long long a[64], modulo = 1000000007, tmp, cnt;
  for (int i = 0; i < 64; i++) {
    a[i] = 0;
  }
  for (int i = 0; i < 64; i++) {
    for (int j = 0; j < 64; j++) {
      a[(i & j)]++;
    }
  }
  while (cin >> s) {
    cnt = 1;
    for (int i = 0; i < s.size(); i++) {
      if (s[i] >= '0' && s[i] <= '9')
        tmp = s[i] - '0';
      else if (s[i] >= 'A' && s[i] <= 'Z')
        tmp = s[i] - 'A' + 10;
      else if (s[i] >= 'a' && s[i] <= 'z')
        tmp = s[i] - 'a' + 36;
      else if (s[i] == '-')
        tmp = 62;
      else if (s[i] == '_')
        tmp = 63;
      cnt = (cnt * a[tmp]) % modulo;
    }
    cout << cnt << endl;
  }
}
