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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: C = None
        self.o: C = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: E = None
        self.x: B = None
        self.t: F = None
        self.s: A = 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.q: D = None
        self.u: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: C = None
        self.o: C = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: E = None
        self.x: B = None
        self.t: F = None
        self.s: A = 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.q: D = None
        self.u: A = None
        self.txt = txt

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

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

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