Given an array of strings, how would you create an array of arrays where each inner array contains anagrams?
Implement group_anagrams(strings) and return the groups in order of each group’s first encountered string. Preserve the original order of strings within each group, use case-sensitive comparisons, and treat an empty string as valid input. Return an empty array for empty input.
def group_anagrams(strings):