class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: C = None
        self.w: B = None
        self.p: I = None
        self.s: B = None
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: A = None
        self.v: E = None
        self.z: D = None
        self.w: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: D = None
        self.p: F = None
        self.w: G = None
        self.x: F = None
        self.y: F = None
        self.o: G = None
        self.r: I = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: G = None
        self.z: I = None
        self.t: A = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: H = None
        self.r: F = None
        self.w: C = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: B = None
        self.o: A = None
        self.p: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: A = None
        self.v: E = None
        self.z: D = None
        self.w: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: D = None
        self.p: F = None
        self.w: G = None
        self.x: F = None
        self.y: F = None
        self.o: G = None
        self.r: I = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: G = None
        self.z: I = None
        self.t: A = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: H = None
        self.r: F = None
        self.w: C = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: B = None
        self.o: A = None
        self.p: D = None
        self.txt = txt

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

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

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