class Solution {
public int maxPower(String s) {
char[] cs = s.toCharArray();
char t = cs[0];
int v = 0, z = 0;
for (char c : cs) {
if (c == t) v++;
else v = 1;
t = c;
if (v > z) z = v;
}
return z;
}
}