class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: C = None
        self.o: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: H = None
        self.p: D = None
        self.t: D = None
        self.w: E = None
        self.y: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: D = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: J = None
        self.r: D = None
        self.s: G = None
        self.o: F = None
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: E = None
        self.z: H = None
        self.o: G = None
        self.r: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: H = None
        self.p: D = None
        self.t: D = None
        self.w: E = None
        self.y: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: D = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: J = None
        self.r: D = None
        self.s: G = None
        self.o: F = None
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: E = None
        self.z: H = None
        self.o: G = None
        self.r: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: G = None
        self.txt = txt

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

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