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

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

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: C = None
        self.r: A = None
        self.v: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: C = None
        self.r: A = None
        self.v: B = None
        self.txt = txt

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

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