def format_legacy_response(response, skills, category):
    """Format responses appropriately for legacy API.  # noqa: E501

    Examples:
    >>> skills = ["Strength", "Hitpoints", "Ranged", "Magic", "Slayer", "Farming"]
    >>> category = "xp"
    >>> response = [
    ...     {
    ...         'skills': {
    ...             'Farming': {'xp': 8109782},
    ...             'Hitpoints': {'xp': 6262476},
    ...             'Magic': {'xp': 5720554},
    ...             'Ranged': {'xp': 4644881},
    ...             'Slayer': {'xp': 2596132},
    ...             'Strength': {'xp': 5403638},
    ...         },
    ...         'player': 'ElderPlinius',
    ...         'timestamp': '2021-12-23',
    ...         'aggregationLevel': 'AggregationLevel.DAILY',
    ...     },
    ...     {
    ...         'skills': {
    ...             'Farming': {'xp': 8234596},
    ...             'Hitpoints': {'xp': 6262585},
    ...             'Magic': {'xp': 5720557},
    ...             'Ranged': {'xp': 4644884},
    ...             'Slayer': {'xp': 2596132},
    ...             'Strength': {'xp': 5403768},
    ...         },
    ...         'player': 'ElderPlinius',
    ...         'timestamp': '2021-12-24',
    ...         'aggregationLevel': 'AggregationLevel.DAILY',
    ...     },
    ... ]
    >>> format_legacy_response(response, skills, category)
    [['2021-12-23', 5403638, 6262476, 4644881, 5720554, 2596132, 8109782], ['2021-12-24', 5403768, 6262585, 4644884, 5720557, 2596132, 8234596]]
    """

    def format_item(item):
        return [item["timestamp"]] + [
            item["skills"][skill][category] for skill in skills
        ]

    return [format_item(item) for item in response]