#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
int main() {
  map<int, char> itc;
  map<char, int> cti;
  vector<char> st;
  for (int i = 0; i <= 9; i++) {
    itc[i] = (i + '0');
    cti[i + '0'] = i;
    st.push_back(i + '0');
  }
  for (char a = 'A'; a <= 'Z'; a++) {
    cti[a] = a - 55;
    itc[a - 55] = a;
    st.push_back(a);
  }
  for (char a = 'a'; a <= 'z'; a++) {
    cti[a] = a - 61;
    itc[a - 61] = a;
    st.push_back(a);
  }
  itc[62] = '-';
  cti['-'] = 62;
  itc[63] = '_';
  cti['_'] = 63;
  st.push_back('-');
  st.push_back('_');
  map<char, int> cnt;
  for (int i = 0; i < st.size(); i++) {
    for (int j = 0; j < st.size(); j++) {
      int res = cti[st[i]] & cti[st[j]];
      if (res >= 0 && res < 64) {
        cnt[itc[res]]++;
      }
    }
  }
  string str;
  cin >> str;
  long long res = 1;
  for (int i = 0; i < str.size(); i++) {
    res = (res % mod * cnt[str[i]] % mod) % mod;
  }
  cout << res << endl;
  return 0;
}
