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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: E = None
        self.v: F = None
        self.q: F = None
        self.t: F = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: B = None
        self.u: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: E = None
        self.v: F = None
        self.q: F = None
        self.t: F = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: B = None
        self.u: B = None
        self.txt = txt

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

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

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

a.p = j
a.s = h
a.y = c
c.u = d
d.u = a
d.r = h
d.v = j
d.q = j
d.t = j
d.s = c
n.p = j
n.y = c
n.u = c
h.q = i
h.o = a
h.u = c
j.v = e
j.z = c
i.p = j
i.y = c
i.u = c
e.q = i
e.o = a
e.u = c
assert e.q.p.v.o.y.u.t.z.txt == "c"