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

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

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: F = None
        self.y: G = None
        self.t: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: A = None
        self.v: B = None
        self.y: F = None
        self.o: E = None
        self.s: E = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: J = None
        self.z: I = None
        self.o: G = None
        self.t: D = None
        self.p: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: F = None
        self.y: G = None
        self.t: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: A = None
        self.v: B = None
        self.y: F = None
        self.o: E = None
        self.s: E = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: J = None
        self.z: I = None
        self.o: G = None
        self.t: D = None
        self.p: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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

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