class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: I = None
        self.z: E = None
        self.o: C = None
        self.u: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: J = None
        self.z: G = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: C = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: I = None
        self.p: F = None
        self.w: J = None
        self.o: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: J = None
        self.z: G = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: C = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: I = None
        self.p: F = None
        self.w: J = None
        self.o: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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

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

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