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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: J = None
        self.q: E = None
        self.t: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: B = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: J = None
        self.q: E = None
        self.t: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: B = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

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

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

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

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