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

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

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

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

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

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

f.w = i
f.u = i
f.o = e
f.p = e
f.v = n
a.z = k
a.u = k
a.x = i
e.p = i
k.z = e
k.w = a
k.s = l
k.p = f
i.w = n
i.s = l
l.w = n
l.s = i
b.w = i
b.u = i
b.o = n
b.p = c
b.v = c
n.p = l
c.p = l
assert i.s.s.w.p.txt == "
class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: C = None
        self.p: C = None
        self.u: E = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

f.w = i
f.u = i
f.o = e
f.p = e
f.v = n
a.z = k
a.u = k
a.x = i
e.p = i
k.z = e
k.w = a
k.s = l
k.p = f
i.w = n
i.s = l
l.w = n
l.s = i
b.w = i
b.u = i
b.o = n
b.p = c
b.v = c
n.p = l
c.p = l
assert i.s.s.w.p.txt == "l"