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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: G = None
        self.z: B = None
        self.r: G = None
        self.v: D = None
        self.q: E = None
        self.w: D = None
        self.x: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: A = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: H = None
        self.y: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: G = None
        self.z: B = None
        self.r: G = None
        self.v: D = None
        self.q: E = None
        self.w: D = None
        self.x: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: A = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: H = None
        self.y: H = None
        self.txt = txt

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

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

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