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

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

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: F = None
        self.r: C = None
        self.q: F = None
        self.s: A = None
        self.w: F = None
        self.z: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: A = None
        self.x: D = None
        self.t: I = None
        self.r: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: F = None
        self.r: C = None
        self.q: F = None
        self.s: A = None
        self.w: F = None
        self.z: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: A = None
        self.x: D = None
        self.t: I = None
        self.r: E = None
        self.txt = txt

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

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

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