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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: F = None
        self.u: G = None
        self.r: A = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: E = None
        self.p: G = None
        self.z: C = None
        self.s: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: B = None
        self.o: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: F = None
        self.u: G = None
        self.r: A = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: E = None
        self.p: G = None
        self.z: C = None
        self.s: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: B = None
        self.o: C = None
        self.txt = txt

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

n.v = j
d.o = h
d.u = i
d.r = i
d.x = j
g.v = n
h.q = f
h.z = g
h.v = j
j.p = g
j.w = e
j.u = i
j.r = n
j.z = h
e.r = n
e.v = j
e.s = j
e.p = i
e.z = g
i.z = g
i.x = j
i.v = n
f.z = g
f.o = g
f.s = d
k.z = g
k.o = g
k.s = d
assert i.z.v.v.u.z.v.v.r.txt == "n"