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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: I = None
        self.v: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: I = None
        self.q: B = None
        self.v: G = None
        self.w: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: J = None
        self.r: J = None
        self.t: H = None
        self.x: E = None
        self.q: E = None
        self.w: F = None
        self.u: H = None
        self.s: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: D = None
        self.o: A = None
        self.v: J = None
        self.q: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: C = None
        self.z: D = None
        self.o: J = None
        self.u: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: I = None
        self.y: H = None
        self.v: A = None
        self.r: A = None
        self.o: H = None
        self.z: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: I = None
        self.v: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: I = None
        self.q: B = None
        self.v: G = None
        self.w: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: J = None
        self.r: J = None
        self.t: H = None
        self.x: E = None
        self.q: E = None
        self.w: F = None
        self.u: H = None
        self.s: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: D = None
        self.o: A = None
        self.v: J = None
        self.q: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: C = None
        self.z: D = None
        self.o: J = None
        self.u: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: I = None
        self.y: H = None
        self.v: A = None
        self.r: A = None
        self.o: H = None
        self.z: E = None
        self.txt = txt

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

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