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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: H = None
        self.y: D = None
        self.z: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: B = None
        self.x: H = None
        self.t: A = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.q: J = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: H = None
        self.y: D = None
        self.z: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: B = None
        self.x: H = None
        self.t: A = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.q: J = None
        self.txt = txt

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

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

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

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