processLine :: String -> String
processLine line =
    let (maxWeightS:_:thingsS) = words line
        maxWeight = readRational maxWeightS
        things = map makeThing thingsS
        packages = packThings maxWeight things
    in  case bestPackage packages of
            ([], _, _) -> "-"
            (indices, _, _) -> tail $ init $ show indices
processLine :: String -> String
processLine line =
    let (maxWeightS:_:thingsS) = words line
        maxWeight = readRational maxWeightS
        things = map makeThing thingsS
        packages = packThings maxWeight things
    in  case bestPackage packages of
            ([], _, _) -> "-"
            (indices, _, _) -> tail $ init $ show indices
processLine line =
    let (maxWeightS:_:thingsS) = words line
        maxWeight = readRational maxWeightS
        things = map makeThing thingsS
        packages = packThings maxWeight things
    in  case bestPackage packages of
            ([], _, _) -> "-"
            (indices, _, _) -> tail $ init $ show indices