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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: H = None
        self.z: F = None
        self.w: A = None
        self.r: E = None
        self.u: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: H = None
        self.z: F = None
        self.w: A = None
        self.r: E = None
        self.u: H = None
        self.txt = txt

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

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

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

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

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

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

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

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