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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: I = None
        self.o: F = None
        self.x: F = None
        self.z: G = None
        self.w: A = 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.q: B = None
        self.p: C = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: H = None
        self.s: D = None
        self.p: A = None
        self.x: D = None
        self.z: B = None
        self.y: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: I = None
        self.o: F = None
        self.x: F = None
        self.z: G = None
        self.w: A = 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.q: B = None
        self.p: C = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: H = None
        self.s: D = None
        self.p: A = None
        self.x: D = None
        self.z: B = None
        self.y: F = None
        self.txt = txt

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

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