class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: B = None
        self.q: F = None
        self.x: D = None
        self.o: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: H = None
        self.u: D = None
        self.p: E = None
        self.z: B = None
        self.q: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: H = None
        self.u: D = None
        self.p: E = None
        self.z: B = None
        self.q: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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