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

class B:
    def __init__(self, txt: str):
        self.t: J = None
        self.q: F = None
        self.r: I = None
        self.y: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: I = None
        self.x: B = None
        self.r: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: F = None
        self.z: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: J = None
        self.q: F = None
        self.r: I = None
        self.y: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: I = None
        self.x: B = None
        self.r: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: F = None
        self.z: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

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