class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: H = None
        self.z: H = None
        self.v: H = None
        self.u: E = None
        self.q: G = None
        self.p: A = None
        self.w: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: E = None
        self.q: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: E = None
        self.q: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: G = None
        self.txt = txt

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

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