class A:
    def __init__(self, txt: str):
        self.z: J = None
        self.t: I = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: C = None
        self.s: A = None
        self.v: B = None
        self.t: G = None
        self.y: B = None
        self.r: C = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: C = None
        self.s: A = None
        self.v: B = None
        self.t: G = None
        self.y: B = None
        self.r: C = None
        self.txt = txt

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

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

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