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

class B:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: D = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: D = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: C = None
        self.txt = txt

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

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

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

k.v = a
k.y = b
k.r = b
k.z = l
k.o = c
m.r = d
m.u = j
m.z = k
b.v = m
b.r = c
j.o = c
j.y = b
j.v = l
j.w = a
j.p = h
h.v = m
h.x = b
h.p = f
a.v = k
a.y = b
a.o = b
a.r = b
a.z = m
d.r = l
d.u = j
d.z = f
c.v = d
c.r = b
f.v = a
f.y = b
f.o = b
f.r = b
f.z = d
l.r = d
l.u = j
l.z = a
assert d.u.p.x.r.txt == "c"