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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: F = None
        self.z: A = None
        self.r: E = None
        self.o: F = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: B = None
        self.q: B = None
        self.y: B = None
        self.z: B = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: B = None
        self.x: B = None
        self.y: B = None
        self.o: A = None
        self.p: B = None
        self.z: C = None
        self.txt = txt

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

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

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

e = A("e")
n = B("n")
h = C("h")
k = D("k")
b = E("b")
m = F("m")
i = G("i")

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: F = None
        self.z: A = None
        self.r: E = None
        self.o: F = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: B = None
        self.q: B = None
        self.y: B = None
        self.z: B = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: B = None
        self.x: B = None
        self.y: B = None
        self.o: A = None
        self.p: B = None
        self.z: C = None
        self.txt = txt

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

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

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

e = A("e")
n = B("n")
h = C("h")
k = D("k")
b = E("b")
m = F("m")
i = G("i")

e.z = b
n.q = m
n.y = m
n.o = m
n.z = e
n.r = b
n.u = b
h.u = m
h.x = m
h.v = n
h.q = n
h.y = n
h.z = n
k.r = m
k.v = n
k.x = n
k.y = n
k.p = n
k.o = e
k.z = h
b.u = i
b.p = h
b.v = e
m.z = e
m.u = e
m.t = i
m.p = k
i.y = e
assert n.r.v.z.txt == "b"