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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: I = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: J = None
        self.s: G = None
        self.v: F = None
        self.r: B = None
        self.o: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: I = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: J = None
        self.s: G = None
        self.v: F = None
        self.r: B = None
        self.o: H = None
        self.txt = txt

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

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

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