class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: C = None
        self.q: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: A = None
        self.txt = txt

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

i.x = k
i.w = k
i.q = b
g.v = e
g.t = e
g.q = a
f.p = e
f.u = b
k.p = e
k.u = b
a.v = e
a.t = e
a.q = d
d.v = f
d.t = f
d.q = a
h.v = e
h.t = f
h.q = g
e.p = f
e.u = i
b.x = e
b.w = k
b.q = i
assert e.u.q.x.txt == "
class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: C = None
        self.q: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: A = None
        self.txt = txt

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

i.x = k
i.w = k
i.q = b
g.v = e
g.t = e
g.q = a
f.p = e
f.u = b
k.p = e
k.u = b
a.v = e
a.t = e
a.q = d
d.v = f
d.t = f
d.q = a
h.v = e
h.t = f
h.q = g
e.p = f
e.u = i
b.x = e
b.w = k
b.q = i
assert e.u.q.x.txt == "e"