class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: E = None
        self.r: H = None
        self.t: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: G = None
        self.u: E = None
        self.r: E = None
        self.s: C = None
        self.t: E = None
        self.txt = txt

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

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

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

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

j = A("j")
c = B("c")
d = C("d")
b = D("b")
f = E("f")
e = F("e")
a = G("a")
k = H("k")
n = E("n")

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: G = None
        self.u: E = None
        self.r: E = None
        self.s: C = None
        self.t: E = None
        self.txt = txt

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

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

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

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

j = A("j")
c = B("c")
d = C("d")
b = D("b")
f = E("f")
e = F("e")
a = G("a")
k = H("k")
n = E("n")

j.w = d
j.s = n
j.r = k
j.t = c
c.x = a
c.q = a
c.t = a
c.y = n
c.s = e
c.v = e
c.z = d
c.o = b
d.r = f
d.q = b
d.t = e
b.y = k
b.z = a
b.u = f
b.r = f
b.s = d
b.t = n
f.v = k
f.t = k
f.q = j
f.r = j
f.o = c
f.s = e
f.z = n
e.q = b
e.o = d
e.r = d
e.s = n
a.s = k
a.q = e
a.o = e
k.y = j
k.v = a
k.w = e
n.v = k
n.t = k
n.q = j
n.r = j
n.o = c
n.s = e
n.z = f
assert a.o.q.y.v.s.w.s.txt == "n"