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

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: A = None
        self.z: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: D = None
        self.txt = txt

j = A("j")
n = B("n")
b = C("b")
k = D("k")
e = E("e")
c = F("c")

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

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: A = None
        self.z: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: D = None
        self.txt = txt

j = A("j")
n = B("n")
b = C("b")
k = D("k")
e = E("e")
c = F("c")

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