input: Write a python function to generate unique substrings of a given string.
  assert unique_substrings("abcabc") == ['a', 'ab', 'abc', 'abca', 'abcab', 'abcabc', 'b', 'bc', 'bca', 'bcab', 'bcabc', 'c', 'ca', 'cab', 'cabc']
  assert unique_substrings("aaa") == ['a', 'aa', 'aaa']
  assert unique_substrings("abcd") == ['a', 'ab', 'abc', 'abcd', 'b', 'bc', 'bcd', 'c', 'cd', 'd']
output: def unique_substrings(s):
      substrings = set()
      n = len(s)
      for i in range(n):
          for j in range(i + 1, n + 1):
              substrings.add(s[i:j])
      return sorted(substrings)