class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.o: D = None
        self.t: A = None
        self.v: G = None
        self.y: A = None
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: H = None
        self.x: G = None
        self.q: J = None
        self.s: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: A = None
        self.y: I = None
        self.u: A = None
        self.o: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.o: D = None
        self.t: A = None
        self.v: G = None
        self.y: A = None
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: H = None
        self.x: G = None
        self.q: J = None
        self.s: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: A = None
        self.y: I = None
        self.u: A = None
        self.o: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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