class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: C = None
        self.w: G = None
        self.x: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: F = None
        self.w: E = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: B = None
        self.v: G = None
        self.s: C = None
        self.y: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: F = None
        self.w: E = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: B = None
        self.v: G = None
        self.s: C = None
        self.y: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: B = None
        self.txt = txt

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

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

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