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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: D = None
        self.p: F = None
        self.s: G = None
        self.q: E = None
        self.r: F = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: F = None
        self.r: F = None
        self.s: B = None
        self.t: A = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: A = None
        self.t: D = None
        self.r: A = None
        self.z: C = None
        self.txt = txt

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

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

e = A("e")
g = B("g")
n = C("n")
m = D("m")
c = E("c")
h = F("h")
l = G("l")

e.z = h
g.t = e
n.t = c
n.q = c
n.y = c
n.v = m
n.p = h
n.r = h
n.s = l
m.z = c
m.v = h
m.r = h
m.s = g
m.t = e
m.o = l
c.u = m
c.t = m
c.y = e
c.r = e
c.z = n
h.y = e
h.x = e
h.t = e
h.z = l
h.w = m
h.s = c
h.r = n
l.z = n
l.v = n
l.x = e
l.o = e
l.t = c
l.s = h
assert c.u.t.z.t.txt == "
class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: D = None
        self.p: F = None
        self.s: G = None
        self.q: E = None
        self.r: F = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: F = None
        self.r: F = None
        self.s: B = None
        self.t: A = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: A = None
        self.t: D = None
        self.r: A = None
        self.z: C = None
        self.txt = txt

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

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

e = A("e")
g = B("g")
n = C("n")
m = D("m")
c = E("c")
h = F("h")
l = G("l")

e.z = h
g.t = e
n.t = c
n.q = c
n.y = c
n.v = m
n.p = h
n.r = h
n.s = l
m.z = c
m.v = h
m.r = h
m.s = g
m.t = e
m.o = l
c.u = m
c.t = m
c.y = e
c.r = e
c.z = n
h.y = e
h.x = e
h.t = e
h.z = l
h.w = m
h.s = c
h.r = n
l.z = n
l.v = n
l.x = e
l.o = e
l.t = c
l.s = h
assert c.u.t.z.t.txt == "e"