class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: C = None
        self.z: E = None
        self.r: B = None
        self.u: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: G = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: F = None
        self.t: G = None
        self.x: A = None
        self.p: B = None
        self.w: B = None
        self.s: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: B = None
        self.x: C = None
        self.y: G = None
        self.txt = txt

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

k = A("k")
h = B("h")
g = C("g")
i = D("i")
j = E("j")
d = F("d")
a = G("a")
e = H("e")
f = F("f")
m = G("m")

k.s = d
k.y = g
k.u = g
k.z = j
k.r = h
h.v = d
h.y = m
h.z = i
g.r = e
g.o = f
g.t = a
g.x = k
g.p = h
g.w = h
g.s = h
i.v = g
i.o = g
i.z = g
i.w = k
i.q = a
j.o = a
d.z = f
d.q = f
d.y = f
d.v = h
d.x = g
d.u = g
d.s = a
d.t = j
a.t = e
a.r = h
a.x = g
a.y = m
e.p = i
e.v = d
e.s = k
e.q = h
e.o = j
e.z = a
e.r = g
f.z = d
f.q = d
f.y = d
f.v = h
f.x = g
f.u = g
f.s = a
f.t = j
m.t = e
m.r = h
m.x = g
m.y = a
assert j.o.x.x.s.txt == "
class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: C = None
        self.z: E = None
        self.r: B = None
        self.u: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: G = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: F = None
        self.t: G = None
        self.x: A = None
        self.p: B = None
        self.w: B = None
        self.s: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: B = None
        self.x: C = None
        self.y: G = None
        self.txt = txt

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

k = A("k")
h = B("h")
g = C("g")
i = D("i")
j = E("j")
d = F("d")
a = G("a")
e = H("e")
f = F("f")
m = G("m")

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