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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: F = None
        self.u: B = None
        self.x: F = None
        self.r: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: C = None
        self.s: E = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: F = None
        self.u: B = None
        self.x: F = None
        self.r: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: C = None
        self.s: E = None
        self.txt = txt

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

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

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

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