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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: A = None
        self.r: G = None
        self.s: H = None
        self.u: I = None
        self.p: C = None
        self.v: D = None
        self.y: I = None
        self.w: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: I = None
        self.y: B = None
        self.u: F = None
        self.v: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: C = None
        self.u: B = None
        self.x: J = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: A = None
        self.r: G = None
        self.s: H = None
        self.u: I = None
        self.p: C = None
        self.v: D = None
        self.y: I = None
        self.w: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: I = None
        self.y: B = None
        self.u: F = None
        self.v: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: C = None
        self.u: B = None
        self.x: J = None
        self.txt = txt

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

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

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

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

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

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