class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: D = None
        self.o: H = None
        self.x: G = None
        self.w: C = None
        self.y: E = None
        self.t: F = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: C = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: C = None
        self.v: C = None
        self.txt = txt

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

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

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

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