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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: I = None
        self.q: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: J = None
        self.z: C = None
        self.s: E = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.z: J = None
        self.y: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: B = None
        self.w: F = None
        self.o: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: I = None
        self.q: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: J = None
        self.z: C = None
        self.s: E = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.z: J = None
        self.y: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: B = None
        self.w: F = None
        self.o: B = None
        self.txt = txt

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

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