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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: C = None
        self.v: E = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: D = None
        self.w: B = None
        self.txt = txt

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

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

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

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

k = A("k")
h = B("h")
j = C("j")
m = D("m")
f = E("f")
b = F("b")
n = G("n")
l = A("l")
d = E("d")

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: C = None
        self.v: E = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: D = None
        self.w: B = None
        self.txt = txt

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

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

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

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

k = A("k")
h = B("h")
j = C("j")
m = D("m")
f = E("f")
b = F("b")
n = G("n")
l = A("l")
d = E("d")

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