class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: E = None
        self.o: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: C = None
        self.r: F = None
        self.o: E = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: D = None
        self.v: D = None
        self.p: A = None
        self.s: F = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

m = A("m")
d = B("d")
b = C("b")
e = D("e")
k = E("k")
c = F("c")
a = B("a")
n = D("n")
j = C("j")
i = B("i")

m.p = c
m.w = k
d.s = c
d.p = k
d.o = n
b.o = i
b.t = i
b.s = m
b.z = m
b.p = c
b.q = n
e.z = k
e.o = k
e.u = k
e.q = b
e.r = c
k.w = m
k.p = m
k.u = e
k.q = e
k.v = n
k.s = c
c.z = i
a.s = c
a.p = k
a.o = n
n.z = k
n.o = k
n.u = k
n.q = j
n.r = c
j.o = a
j.s = m
j.z = m
j.p = c
j.q = n
j.t = d
i.s = c
i.p = k
i.o = n
assert m.p.z.o.q.p.z.txt == "
class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: E = None
        self.o: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: C = None
        self.r: F = None
        self.o: E = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: D = None
        self.v: D = None
        self.p: A = None
        self.s: F = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

m = A("m")
d = B("d")
b = C("b")
e = D("e")
k = E("k")
c = F("c")
a = B("a")
n = D("n")
j = C("j")
i = B("i")

m.p = c
m.w = k
d.s = c
d.p = k
d.o = n
b.o = i
b.t = i
b.s = m
b.z = m
b.p = c
b.q = n
e.z = k
e.o = k
e.u = k
e.q = b
e.r = c
k.w = m
k.p = m
k.u = e
k.q = e
k.v = n
k.s = c
c.z = i
a.s = c
a.p = k
a.o = n
n.z = k
n.o = k
n.u = k
n.q = j
n.r = c
j.o = a
j.s = m
j.z = m
j.p = c
j.q = n
j.t = d
i.s = c
i.p = k
i.o = n
assert m.p.z.o.q.p.z.txt == "i"