#include #include std::string getDrive(int i) { std::string s; do { s.insert(0, 1, (i % 26) + 'a'); i /= 26; } while(i--); return s; } int main() { for(int i = 0; i < 100000; ++i) { std::cout << "sd" << getDrive(i) << std::endl; } }