#include <algorithm>
#include <iostream>
#include <stdio.h>
#include <vector>
#include <map>
#include <stack>
#include <queue>
#include <deque>
using namespace std;
int arr[26];
int main() {
//freopen("input.txt", "rt", stdin);
string s;
cin >> s;
for (int i = 97; i < 123; i++) {
bool flag = 0;
for (int j = 0; j < s.length(); j++) {
if (i == s[j]) {
printf("%d ", j);
flag = 1;
break;
}
}
if (flag == 0) {
printf("-1 ");
}
}
return 0;
}