class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: F = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: A = None
        self.r: G = None
        self.z: F = None
        self.y: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: E = None
        self.r: F = None
        self.t: F = None
        self.y: G = None
        self.q: G = None
        self.x: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: B = None
        self.s: D = None
        self.u: C = None
        self.q: E = None
        self.txt = txt

k = A("k")
l = B("l")
j = C("j")
f = D("f")
g = E("g")
h = F("h")
c = G("c")
n = C("n")
i = F("i")
b = A("b")

k.z = g
k.r = g
k.o = i
l.p = h
l.q = k
l.r = c
l.z = i
l.y = n
j.v = h
j.q = c
j.x = c
j.p = n
j.u = n
j.t = l
j.s = i
f.s = b
f.w = g
f.r = h
f.t = h
f.y = c
f.q = c
f.x = j
g.z = c
h.z = i
c.y = l
c.t = l
c.s = f
c.u = n
c.q = g
n.v = h
n.q = c
n.x = c
n.p = j
n.u = j
n.t = l
n.s = i
i.z = h
b.z = g
b.r = g
b.o = i
assert n.x.s.s.o.z.z.z.txt == "
class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: F = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: A = None
        self.r: G = None
        self.z: F = None
        self.y: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: E = None
        self.r: F = None
        self.t: F = None
        self.y: G = None
        self.q: G = None
        self.x: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: B = None
        self.s: D = None
        self.u: C = None
        self.q: E = None
        self.txt = txt

k = A("k")
l = B("l")
j = C("j")
f = D("f")
g = E("g")
h = F("h")
c = G("c")
n = C("n")
i = F("i")
b = A("b")

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