class A:
    def __init__(self, txt: str):
        self.s: J = None
        self.v: D = None
        self.w: E = None
        self.r: B = None
        self.z: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: A = None
        self.q: F = None
        self.z: H = None
        self.y: I = None
        self.u: G = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: D = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: J = None
        self.u: C = None
        self.q: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: J = None
        self.p: A = None
        self.v: H = None
        self.u: J = None
        self.z: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: A = None
        self.q: E = None
        self.u: D = None
        self.y: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: B = None
        self.r: E = None
        self.z: E = None
        self.s: G = None
        self.t: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: A = None
        self.q: F = None
        self.z: H = None
        self.y: I = None
        self.u: G = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: D = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: J = None
        self.u: C = None
        self.q: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: J = None
        self.p: A = None
        self.v: H = None
        self.u: J = None
        self.z: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: A = None
        self.q: E = None
        self.u: D = None
        self.y: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: B = None
        self.r: E = None
        self.z: E = None
        self.s: G = None
        self.t: F = None
        self.txt = txt

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

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