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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: E = None
        self.q: H = None
        self.p: E = None
        self.o: A = None
        self.y: E = None
        self.t: C = None
        self.u: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: F = None
        self.y: E = None
        self.v: F = None
        self.t: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: E = None
        self.q: H = None
        self.p: E = None
        self.o: A = None
        self.y: E = None
        self.t: C = None
        self.u: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: F = None
        self.y: E = None
        self.v: F = None
        self.t: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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