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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: D = None
        self.p: C = None
        self.x: E = None
        self.v: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: F = None
        self.v: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: D = None
        self.p: C = None
        self.x: E = None
        self.v: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: F = None
        self.v: A = None
        self.txt = txt

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

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

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

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