class A:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: E = None
        self.p: D = None
        self.t: A = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: E = None
        self.s: B = None
        self.y: E = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: E = None
        self.x: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: E = None
        self.s: B = None
        self.y: E = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: E = None
        self.x: D = None
        self.txt = txt

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

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