import java.util.Collections;
import java.util.LinkedList;
import java.util.List;


public class IntegerWithHistory {

    
    private final List<Integer> history;

    
    public IntegerWithHistory(Integer value) {
        history = new LinkedList<>();
        history.add(value);
    }

    
    public void set(Integer value) {