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

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

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: C = None
        self.o: D = None
        self.x: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: C = None
        self.o: D = None
        self.x: A = None
        self.txt = txt

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

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