class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: F = None
        self.o: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: C = None
        self.w: F = None
        self.u: A = None
        self.s: B = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: C = None
        self.w: F = None
        self.u: A = None
        self.s: B = None
        self.q: A = None
        self.txt = txt

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

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

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