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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: D = None
        self.y: E = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: D = None
        self.y: E = None
        self.z: E = None
        self.txt = txt

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

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