#include <bits/stdc++.h>
using namespace std;
template <class T>
bool remin(T &a, const T &b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool remax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
int nxt() {
  int first;
  scanf("%d", &first);
  return first;
}
long long gcd(long long a, long long b) {
  a = abs(a);
  b = abs(b);
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
struct pt {
  long long first, second;
  pt() {}
  pt(long long first, long long second) : first(first), second(second) {}
  inline pt operator-(const pt &r) const {
    return pt(first - r.first, second - r.second);
  }
  inline pt operator+(const pt &r) const {
    return pt(first + r.first, second + r.second);
  }
  inline pt operator*(const long long &r) const {
    return pt(first * r, second * r);
  }
  inline long long sqlen() const {
    return abs(first * first + second * second);
  }
  inline bool operator<(const pt &r) const {
    if (first != r.first) return first < r.first;
    return second < r.second;
  }
  inline bool operator==(const pt &r) const {
    return first == r.first && second == r.second;
  }
};
ostream &operator<<(ostream &os, const pt &p) {
  return os << "(" << p.first << "," << p.second << ")";
}
inline long long cross(const pt &l, const pt &r) {
  return l.first * r.second - l.second * r.first;
}
inline long long dot(const pt &l, const pt &r) {
  return l.first * r.first + l.second * r.second;
}
long long pwmod(long long a, long long n, long long mod) {
  long long ret = 1;
  while (n) {
    if (n & 1) ret = ret * a % mod;
    a = a * a % mod;
    n >>= 1;
  }
  return ret;
}
template <typename T>
inline T sqr(T first) {
  return first * first;
}
inline void solve() {
  string s;
  cin >> s;
  int cnt[64];
  memset(cnt, 0, sizeof(cnt));
  for (int i = 0; i < 64; ++i) {
    for (int j = 0; j < 64; ++j) {
      int k = i & j;
      cnt[k]++;
    }
  }
  long long mod = 1000 * 1000 * 1000 + 7;
  long long ret = 1;
  for (char c : s) {
    if (isdigit(c)) {
      ret *= cnt[c - '0'];
    } else if (isupper(c)) {
      ret *= cnt[c - 'A' + 10];
    } else if (islower(c)) {
      ret *= cnt[c - 'a' + 36];
    } else if (c == '-') {
      ret *= cnt[62];
    } else {
      assert(c == '_');
      ret *= cnt[63];
    }
    ret %= mod;
  }
  cout << ret << "\n";
}
void prepare() {}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  prepare();
  int t = 1;
  for (int i = 0; i < (int)(t); i++) {
    solve();
  }
  return 0;
}
