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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: E = None
        self.x: F = None
        self.o: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: A = None
        self.q: C = None
        self.v: D = None
        self.x: E = None
        self.txt = txt

l = A("l")
j = B("j")
a = C("a")
d = D("d")
m = E("m")
e = F("e")
i = D("i")
b = C("b")
h = D("h")
g = F("g")

l.z = h
l.q = j
l.y = m
j.q = l
j.w = m
j.o = m
j.x = e
a.t = l
a.u = l
a.x = m
d.o = l
d.r = h
d.z = i
m.x = j
m.y = d
e.o = m
e.x = m
e.t = l
e.q = a
e.v = d
i.o = l
i.r = h
i.z = h
b.t = l
b.u = l
b.x = m
h.o = l
h.r = i
h.z = i
g.o = m
g.x = m
g.t = l
g.q = a
g.v = i
assert i.r.z.z.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: B = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: E = None
        self.x: F = None
        self.o: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: A = None
        self.q: C = None
        self.v: D = None
        self.x: E = None
        self.txt = txt

l = A("l")
j = B("j")
a = C("a")
d = D("d")
m = E("m")
e = F("e")
i = D("i")
b = C("b")
h = D("h")
g = F("g")

l.z = h
l.q = j
l.y = m
j.q = l
j.w = m
j.o = m
j.x = e
a.t = l
a.u = l
a.x = m
d.o = l
d.r = h
d.z = i
m.x = j
m.y = d
e.o = m
e.x = m
e.t = l
e.q = a
e.v = d
i.o = l
i.r = h
i.z = h
b.t = l
b.u = l
b.x = m
h.o = l
h.r = i
h.z = i
g.o = m
g.x = m
g.t = l
g.q = a
g.v = i
assert i.r.z.z.txt == "h"