class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: E = None
        self.y: E = None
        self.z: A = None
        self.p: D = None
        self.q: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: E = None
        self.r: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: A = None
        self.z: E = None
        self.p: E = None
        self.txt = txt

i = A("i")
n = B("n")
k = C("k")
h = D("h")
m = E("m")
f = F("f")
b = F("b")
j = A("j")

i.t = k
i.q = k
i.o = m
i.y = m
i.z = j
i.p = h
n.t = h
n.s = h
k.u = h
k.t = h
k.z = i
k.y = n
h.v = m
h.t = m
h.r = j
m.z = k
m.q = j
m.o = h
m.t = h
f.s = n
f.u = j
f.z = m
f.p = m
b.s = n
b.u = j
b.z = m
b.p = m
j.t = k
j.q = k
j.o = m
j.y = m
j.z = i
j.p = h
assert h.r.p.t.z.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: E = None
        self.y: E = None
        self.z: A = None
        self.p: D = None
        self.q: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: E = None
        self.r: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: A = None
        self.z: E = None
        self.p: E = None
        self.txt = txt

i = A("i")
n = B("n")
k = C("k")
h = D("h")
m = E("m")
f = F("f")
b = F("b")
j = A("j")

i.t = k
i.q = k
i.o = m
i.y = m
i.z = j
i.p = h
n.t = h
n.s = h
k.u = h
k.t = h
k.z = i
k.y = n
h.v = m
h.t = m
h.r = j
m.z = k
m.q = j
m.o = h
m.t = h
f.s = n
f.u = j
f.z = m
f.p = m
b.s = n
b.u = j
b.z = m
b.p = m
j.t = k
j.q = k
j.o = m
j.y = m
j.z = i
j.p = h
assert h.r.p.t.z.txt == "k"