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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: E = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: G = None
        self.q: A = None
        self.w: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: F = None
        self.w: B = None
        self.txt = txt

a = A("a")
f = B("f")
e = C("e")
h = D("h")
l = E("l")
k = F("k")
i = G("i")

a.v = k
a.r = f
a.o = l
a.t = h
a.y = e
a.x = e
f.r = l
f.p = l
f.v = k
e.s = i
e.z = i
e.q = a
e.w = h
h.s = a
h.z = f
l.o = k
l.v = k
l.x = i
l.y = i
l.w = f
l.p = h
l.s = e
k.w = a
k.x = a
k.r = e
i.u = f
i.w = f
i.x = k
assert e.z.w.r.x.x.txt == "
class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: B = None
        self.o: E = None
        self.t: D = None
        self.y: C = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: E = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: G = None
        self.q: A = None
        self.w: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: F = None
        self.w: B = None
        self.txt = txt

a = A("a")
f = B("f")
e = C("e")
h = D("h")
l = E("l")
k = F("k")
i = G("i")

a.v = k
a.r = f
a.o = l
a.t = h
a.y = e
a.x = e
f.r = l
f.p = l
f.v = k
e.s = i
e.z = i
e.q = a
e.w = h
h.s = a
h.z = f
l.o = k
l.v = k
l.x = i
l.y = i
l.w = f
l.p = h
l.s = e
k.w = a
k.x = a
k.r = e
i.u = f
i.w = f
i.x = k
assert e.z.w.r.x.x.txt == "k"