class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: I = None
        self.s: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: B = None
        self.v: H = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: G = None
        self.x: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: J = None
        self.z: D = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: G = None
        self.t: J = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: A = None
        self.y: H = None
        self.o: H = None
        self.v: A = None
        self.w: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: I = None
        self.o: C = None
        self.u: B = None
        self.w: B = None
        self.z: I = None
        self.r: H = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: B = None
        self.v: H = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: G = None
        self.x: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: J = None
        self.z: D = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: G = None
        self.t: J = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: A = None
        self.y: H = None
        self.o: H = None
        self.v: A = None
        self.w: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: I = None
        self.o: C = None
        self.u: B = None
        self.w: B = None
        self.z: I = None
        self.r: H = None
        self.txt = txt

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

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