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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: F = None
        self.p: C = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: H = None
        self.w: A = None
        self.p: B = None
        self.u: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: E = None
        self.q: D = None
        self.w: F = None
        self.o: A = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: A = None
        self.x: E = None
        self.t: A = None
        self.y: G = None
        self.r: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: F = None
        self.p: C = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: H = None
        self.w: A = None
        self.p: B = None
        self.u: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: E = None
        self.q: D = None
        self.w: F = None
        self.o: A = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: A = None
        self.x: E = None
        self.t: A = None
        self.y: G = None
        self.r: D = None
        self.txt = txt

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

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