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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: G = None
        self.txt = txt

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

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

n = A("n")
j = B("j")
g = C("g")
e = D("e")
h = E("h")
f = F("f")
b = G("b")
m = H("m")
k = D("k")

n.s = e
n.u = h
j.x = k
j.v = f
g.y = e
g.w = h
e.w = j
e.t = n
e.q = n
e.x = k
e.p = k
e.s = k
e.z = f
e.o = f
h.w = n
f.v = h
f.x = b
b.o = m
b.x = m
b.q = h
b.v = h
b.u = j
m.t = g
m.o = h
k.w = j
k.t = n
k.q = n
k.x = e
k.p = e
k.s = e
k.z = f
k.o = f
assert e.w.v.x.u.v.v.w.txt == "
class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: E = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: G = None
        self.txt = txt

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

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

n = A("n")
j = B("j")
g = C("g")
e = D("e")
h = E("h")
f = F("f")
b = G("b")
m = H("m")
k = D("k")

n.s = e
n.u = h
j.x = k
j.v = f
g.y = e
g.w = h
e.w = j
e.t = n
e.q = n
e.x = k
e.p = k
e.s = k
e.z = f
e.o = f
h.w = n
f.v = h
f.x = b
b.o = m
b.x = m
b.q = h
b.v = h
b.u = j
m.t = g
m.o = h
k.w = j
k.t = n
k.q = n
k.x = e
k.p = e
k.s = e
k.z = f
k.o = f
assert e.w.v.x.u.v.v.w.txt == "n"