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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: H = None
        self.o: A = None
        self.u: F = None
        self.z: H = None
        self.r: E = None
        self.y: H = None
        self.x: C = None
        self.p: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: B = None
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: C = None
        self.v: F = None
        self.r: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: E = None
        self.v: B = None
        self.o: J = None
        self.s: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: F = None
        self.s: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: D = None
        self.p: A = None
        self.w: H = None
        self.q: D = None
        self.r: A = None
        self.y: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: H = None
        self.o: A = None
        self.u: F = None
        self.z: H = None
        self.r: E = None
        self.y: H = None
        self.x: C = None
        self.p: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: B = None
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: C = None
        self.v: F = None
        self.r: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: E = None
        self.v: B = None
        self.o: J = None
        self.s: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: F = None
        self.s: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: D = None
        self.p: A = None
        self.w: H = None
        self.q: D = None
        self.r: A = None
        self.y: C = None
        self.txt = txt

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

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