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

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

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: D = None
        self.q: F = None
        self.r: F = None
        self.s: E = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: G = None
        self.s: A = None
        self.x: F = None
        self.w: A = None
        self.q: B = None
        self.r: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: H = None
        self.o: C = None
        self.p: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: D = None
        self.q: F = None
        self.r: F = None
        self.s: E = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: G = None
        self.s: A = None
        self.x: F = None
        self.w: A = None
        self.q: B = None
        self.r: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: H = None
        self.o: C = None
        self.p: E = None
        self.txt = txt

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

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

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