main :: IO ()
main = do
    contents <- readFile "input.txt"
    let floors1 = map parseFloor $ lines contents

    let (items1, _) = dataToNumeric . map snd . sortOn fst $ floors1

    let initialState1 = initState 0 $ map combineItems items1

    -- this should run fast
    print $ solveBFS initialState1

    let extra2 = [('G', "elerium"), ('M', "elerium"), ('G', "dilithium"), ('M', "dilithium")]

    -- add extra2 to the first floor
    let floors2 = (0, snd (head floors1) ++ extra2) : tail floors1

    let (items2, _) = dataToNumeric . map snd . sortOn fst $ floors2
    let initialState2 = initState 0 $ map combineItems items2

    -- this will take some time
    print $ solveBFS initialState2
main :: IO ()
main = do
    contents <- readFile "input.txt"
    let floors1 = map parseFloor $ lines contents

    let (items1, _) = dataToNumeric . map snd . sortOn fst $ floors1

    let initialState1 = initState 0 $ map combineItems items1

    -- this should run fast
    print $ solveBFS initialState1

    let extra2 = [('G', "elerium"), ('M', "elerium"), ('G', "dilithium"), ('M', "dilithium")]

    -- add extra2 to the first floor
    let floors2 = (0, snd (head floors1) ++ extra2) : tail floors1

    let (items2, _) = dataToNumeric . map snd . sortOn fst $ floors2
    let initialState2 = initState 0 $ map combineItems items2

    -- this will take some time
    print $ solveBFS initialState2
main = do
    contents <- readFile "input.txt"
    let floors1 = map parseFloor $ lines contents

    let (items1, _) = dataToNumeric . map snd . sortOn fst $ floors1

    let initialState1 = initState 0 $ map combineItems items1

    -- this should run fast
    print $ solveBFS initialState1

    let extra2 = [('G', "elerium"), ('M', "elerium"), ('G', "dilithium"), ('M', "dilithium")]

    -- add extra2 to the first floor
    let floors2 = (0, snd (head floors1) ++ extra2) : tail floors1

    let (items2, _) = dataToNumeric . map snd . sortOn fst $ floors2
    let initialState2 = initState 0 $ map combineItems items2

    -- this will take some time
    print $ solveBFS initialState2