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

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: D = None
        self.s: C = None
        self.q: I = None
        self.p: F = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: G = None
        self.r: B = None
        self.u: C = None
        self.q: D = None
        self.y: C = None
        self.p: B = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: I = None
        self.p: B = None
        self.r: F = None
        self.u: C = None
        self.t: F = None
        self.s: G = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: E = None
        self.o: B = None
        self.w: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: F = None
        self.q: F = None
        self.u: B = None
        self.r: B = None
        self.v: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: D = None
        self.s: C = None
        self.q: I = None
        self.p: F = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: G = None
        self.r: B = None
        self.u: C = None
        self.q: D = None
        self.y: C = None
        self.p: B = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: I = None
        self.p: B = None
        self.r: F = None
        self.u: C = None
        self.t: F = None
        self.s: G = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: E = None
        self.o: B = None
        self.w: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: F = None
        self.q: F = None
        self.u: B = None
        self.r: B = None
        self.v: D = None
        self.txt = txt

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

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

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

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