class A:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: A = None
        self.w: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

i = A("i")
e = B("e")
k = C("k")
b = B("b")
f = C("f")
h = A("h")
c = C("c")
g = A("g")
a = A("a")

i.z = h
i.y = a
i.w = g
e.q = g
k.t = f
k.o = f
k.v = i
b.q = i
f.t = k
f.o = k
f.v = h
h.z = i
h.w = i
h.y = g
c.t = f
c.o = f
c.v = i
g.z = h
g.w = h
g.y = a
a.z = i
a.y = h
a.w = h
assert e.q.w.w.y.w.y.y.z.txt == "
class A:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: A = None
        self.w: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

i = A("i")
e = B("e")
k = C("k")
b = B("b")
f = C("f")
h = A("h")
c = C("c")
g = A("g")
a = A("a")

i.z = h
i.y = a
i.w = g
e.q = g
k.t = f
k.o = f
k.v = i
b.q = i
f.t = k
f.o = k
f.v = h
h.z = i
h.w = i
h.y = g
c.t = f
c.o = f
c.v = i
g.z = h
g.w = h
g.y = a
a.z = i
a.y = h
a.w = h
assert e.q.w.w.y.w.y.y.z.txt == "i"