import stanford.karel.SuperKarel;

public class A2_Inverse extends SuperKarel {
    public void run() {
        go();
        left();
        while (frontIsClear()) {
            if (crystalsOnCell()) {
                get();
            } else {
                put();
            }
            go();
        }
        if (crystalsOnCell()) {
            get();
        } else {
            put();
        }
        left();
        go();
    }
}
