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

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: B = None
        self.y: B = None
        self.x: D = None
        self.txt = txt

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

c = A("c")
j = B("j")
f = C("f")
l = D("l")
n = E("n")
k = F("k")
d = F("d")
b = C("b")

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: B = None
        self.y: B = None
        self.x: D = None
        self.txt = txt

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

c = A("c")
j = B("j")
f = C("f")
l = D("l")
n = E("n")
k = F("k")
d = F("d")
b = C("b")

c.p = l
c.y = l
c.v = f
c.u = j
c.r = b
j.u = d
j.y = n
f.o = b
f.q = c
f.v = j
f.z = n
l.q = b
n.r = f
n.u = j
n.y = j
n.x = l
k.p = l
k.s = l
k.y = j
d.p = l
d.s = l
d.y = j
b.o = f
b.q = c
b.v = j
b.z = n
assert n.x.q.z.txt == "n"