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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.v: J = None
        self.o: J = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: J = None
        self.w: I = None
        self.o: A = None
        self.v: C = None
        self.s: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: D = None
        self.s: C = None
        self.r: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.v: J = None
        self.o: J = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: J = None
        self.w: I = None
        self.o: A = None
        self.v: C = None
        self.s: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: D = None
        self.s: C = None
        self.r: B = None
        self.txt = txt

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

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

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