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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: C = None
        self.o: C = None
        self.s: E = None
        self.z: D = None
        self.txt = txt

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

f.w = m
f.p = d
f.t = i
l.x = i
l.v = m
l.y = m
l.p = d
e.t = k
e.p = f
e.v = c
h.x = k
h.t = l
k.w = l
k.r = c
k.o = e
k.s = b
k.z = d
i.w = m
i.p = d
i.t = f
c.t = b
c.p = i
c.v = e
d.x = k
d.t = l
b.w = l
b.r = e
b.o = e
b.s = k
b.z = d
m.x = f
m.v = l
m.y = l
m.p = h
assert i.w.v.p.x.txt == "
class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: D = None
        self.t: A = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: C = None
        self.o: C = None
        self.s: E = None
        self.z: D = None
        self.txt = txt

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

f.w = m
f.p = d
f.t = i
l.x = i
l.v = m
l.y = m
l.p = d
e.t = k
e.p = f
e.v = c
h.x = k
h.t = l
k.w = l
k.r = c
k.o = e
k.s = b
k.z = d
i.w = m
i.p = d
i.t = f
c.t = b
c.p = i
c.v = e
d.x = k
d.t = l
b.w = l
b.r = e
b.o = e
b.s = k
b.z = d
m.x = f
m.v = l
m.y = l
m.p = h
assert i.w.v.p.x.txt == "k"