input: Write a function to remove redundant characters from a given string.
  assert remove_redundant("aabbcc") == "abc"
  assert remove_redundant("hello") == "helo"
  assert remove_redundant("mississippi") == "misp"
  assert remove_redundant("abacabadabacaba") == "abc"
  assert remove_redundant("123123123") == "123"
output: def remove_redundant(s):
      result = []
      seen = set()
      for char in s:
          if char not in seen:
              result.append(char)
              seen.add(char)
      return ''.join(result)