Level up

Limits: 555h33m20s, 256 MB

You are playing a game that has 16 levels. You start with level 1 and after gaining a certain amount of experience, you get to next level, however, once you reach 16, you can not level up any further. Now, there are three kinds of ability in the game, let’s say A;B and S. You can use each level to upgrade an ability. There is a catch though. You can not level S up until you get to level 6. That is, in order to level up ability S, you need to be of level 6 at least. Also, you can level up S only thrice throughout the whole game. The first time you need to be at least level 6, the second time you need to be at least level 12. And for the last time you need to be level 16, that is you pretty much have to use level 16 to upgrade S. In short, you have to level up ability S exactly thrice maintaining the restrictions above. Apart from those three levels where you upgrade S, you are free to upgrade any ability you like. You can upgrade an ability as many times (possibly 0) as you want.

This is a companion discussion topic for the original entry at https://toph.co/p/level-up