class Solution {
public:
    vector<string> ans;
    
    void Hanoi(int n, string left, string mid, string right) {
        if (n == 0) {
            return;
        }
        Hanoi(n-1, left, right, mid);
        string t = "move from " + left + " to " + right;
        ans.push_back(t);
        Hanoi(n-1, mid, left, right);
    }
    vector<string> getSolution(int n) {
        Hanoi(n,"left","mid","right");
        return ans;
    }
};