class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: C = None
        self.z: J = None
        self.q: D = None
        self.o: E = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: E = None
        self.o: G = None
        self.u: D = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: E = None
        self.o: G = None
        self.u: D = None
        self.y: C = None
        self.txt = txt

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

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