class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: F = None
        self.t: I = None
        self.y: F = None
        self.z: I = None
        self.q: I = None
        self.s: D = None
        self.p: F = None
        self.o: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: C = None
        self.s: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: C = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: I = None
        self.t: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: I = None
        self.u: D = None
        self.q: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: C = None
        self.u: F = None
        self.r: G = None
        self.y: A = None
        self.v: H = None
        self.p: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: C = None
        self.s: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: C = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: I = None
        self.t: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: I = None
        self.u: D = None
        self.q: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: C = None
        self.u: F = None
        self.r: G = None
        self.y: A = None
        self.v: H = None
        self.p: C = None
        self.txt = txt

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

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