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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: A = None
        self.o: A = None
        self.t: C = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: C = None
        self.txt = txt

c = A("c")
m = B("m")
j = C("j")
k = D("k")
a = E("a")
l = B("l")
f = D("f")

c.v = f
c.y = a
c.x = j
c.q = l
m.p = j
m.t = j
m.z = c
m.o = c
m.u = k
j.u = l
j.s = c
k.v = a
k.u = j
k.y = f
k.z = l
a.v = j
a.w = j
l.p = j
l.t = j
l.z = c
l.o = c
l.u = k
f.v = a
f.u = j
f.y = k
f.z = l
assert f.v.w.s.y.txt == "
class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: E = None
        self.x: C = None
        self.q: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: A = None
        self.o: A = None
        self.t: C = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: C = None
        self.txt = txt

c = A("c")
m = B("m")
j = C("j")
k = D("k")
a = E("a")
l = B("l")
f = D("f")

c.v = f
c.y = a
c.x = j
c.q = l
m.p = j
m.t = j
m.z = c
m.o = c
m.u = k
j.u = l
j.s = c
k.v = a
k.u = j
k.y = f
k.z = l
a.v = j
a.w = j
l.p = j
l.t = j
l.z = c
l.o = c
l.u = k
f.v = a
f.u = j
f.y = k
f.z = l
assert f.v.w.s.y.txt == "a"