#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
// 读取函数,将字符转换为数字
template<typename T>
inline void rd(T &x) {
x = 0;
char c = getchar();
bool f = 0;
while (!isdigit(c)) {
if (c == '-') {
f = 1;
}
c = getchar();
}
while (isdigit(c)) {
x = (x << 3) + (x << 1) + (c ^ '0');
c = getchar();
}
if (f) {
x = ~(x - 1);
}
}
// 读取函数的变长版本
template<typename T, typename...Args>
inline void rd(T &x, Args&...args) {
rd(x);
rd(args...);
}
// 输出函数,将数字输出
inline void wt(int x) {
if (x < 0) {
putchar('-');
x = -x;
}
if (x > 9) {
wt(x / 10);
}
putchar(x % 10 + '0');
}
#define pc(x) putchar(x)
#define wtl(x) wt(x), pc('\n')
#define kg pc(' ')
#define hh pc('\n')
// 动态规划解决问题的主函数
int f[110][10];
signed main() {
// 读取输入字符串
char s[110];
scanf("%s", s + 1);
int l = strlen(s + 1);
}