class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: F = None
        self.p: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.s: I = None
        self.u: D = None
        self.y: G = None
        self.t: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.r: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: G = None
        self.s: F = None
        self.z: A = None
        self.v: G = None
        self.q: A = None
        self.w: E = None
        self.t: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: B = None
        self.w: A = None
        self.p: G = None
        self.t: G = None
        self.x: F = None
        self.o: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.s: I = None
        self.u: D = None
        self.y: G = None
        self.t: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.r: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: G = None
        self.s: F = None
        self.z: A = None
        self.v: G = None
        self.q: A = None
        self.w: E = None
        self.t: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: B = None
        self.w: A = None
        self.p: G = None
        self.t: G = None
        self.x: F = None
        self.o: F = None
        self.txt = txt

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

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