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

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

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

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

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

f = A("f")
l = B("l")
h = C("h")
j = D("j")
k = E("k")
e = C("e")
n = C("n")

f.x = l
f.w = l
f.p = j
f.t = j
l.r = j
l.v = k
l.s = k
l.p = n
l.q = f
h.y = l
h.t = l
h.v = k
h.s = k
h.z = j
j.z = k
k.t = j
k.z = f
k.v = f
e.y = l
e.t = l
e.v = k
e.s = k
e.z = j
n.y = l
n.t = l
n.v = k
n.s = k
n.z = j
assert l.q.t.z.txt == "
class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: D = None
        self.t: D = None
        self.w: B = None
        self.txt = txt

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

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

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

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

f = A("f")
l = B("l")
h = C("h")
j = D("j")
k = E("k")
e = C("e")
n = C("n")

f.x = l
f.w = l
f.p = j
f.t = j
l.r = j
l.v = k
l.s = k
l.p = n
l.q = f
h.y = l
h.t = l
h.v = k
h.s = k
h.z = j
j.z = k
k.t = j
k.z = f
k.v = f
e.y = l
e.t = l
e.v = k
e.s = k
e.z = j
n.y = l
n.t = l
n.v = k
n.s = k
n.z = j
assert l.q.t.z.txt == "k"