class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: H = None
        self.r: C = None
        self.v: D = None
        self.u: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: E = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: F = None
        self.y: B = None
        self.u: D = None
        self.txt = txt

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

a.y = m
a.r = m
a.u = m
a.x = k
a.v = g
n.s = i
n.y = j
m.u = g
m.v = g
m.x = j
m.w = k
m.z = i
m.o = e
m.q = e
g.z = i
e.r = g
e.q = j
j.w = g
j.o = e
j.s = n
i.u = a
k.o = n
k.y = n
k.w = j
k.u = g
assert g.z.u.x.w.o.txt == "
class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: H = None
        self.r: C = None
        self.v: D = None
        self.u: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: E = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: F = None
        self.y: B = None
        self.u: D = None
        self.txt = txt

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

a.y = m
a.r = m
a.u = m
a.x = k
a.v = g
n.s = i
n.y = j
m.u = g
m.v = g
m.x = j
m.w = k
m.z = i
m.o = e
m.q = e
g.z = i
e.r = g
e.q = j
j.w = g
j.o = e
j.s = n
i.u = a
k.o = n
k.y = n
k.w = j
k.u = g
assert g.z.u.x.w.o.txt == "e"