class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: B = None
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: A = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: C = None
        self.z: A = None
        self.p: A = None
        self.txt = txt

i = A("i")
h = B("h")
c = C("c")
e = D("e")
l = D("l")
g = C("g")

i.t = c
i.o = c
i.y = h
h.o = c
h.s = i
h.t = i
c.v = g
c.s = i
e.o = c
e.x = g
e.z = i
e.p = i
l.o = g
l.x = g
l.z = i
l.p = i
g.v = c
g.s = i
assert i.y.t.t.s.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: B = None
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: A = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: C = None
        self.z: A = None
        self.p: A = None
        self.txt = txt

i = A("i")
h = B("h")
c = C("c")
e = D("e")
l = D("l")
g = C("g")

i.t = c
i.o = c
i.y = h
h.o = c
h.s = i
h.t = i
c.v = g
c.s = i
e.o = c
e.x = g
e.z = i
e.p = i
l.o = g
l.x = g
l.z = i
l.p = i
g.v = c
g.s = i
assert i.y.t.t.s.txt == "i"