class Solution {
public:
    vector<string> solution;
    void dfs(int n, string left, string mid, string right) {
        if(n == 0)
            return;
        dfs(n - 1, left, right, mid);
        solution.push_back("move from " + left + " to " + right);
        dfs(n - 1, mid, left, right);
    }
    vector<string> getSolution(int n) {
        // write code here
        dfs(n, "left", "mid", "right");
        return solution;
    }
};