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

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

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

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

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

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

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

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

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

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

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

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

b.p = f
b.u = i
b.t = k
b.y = k
b.x = d
c.y = k
c.x = f
c.z = d
c.w = l
f.o = i
f.z = n
f.q = n
f.t = l
f.p = c
l.x = b
l.w = d
l.s = k
k.r = l
k.w = f
k.z = f
d.r = l
d.w = f
d.z = f
i.p = f
i.u = b
i.t = d
i.x = k
i.y = k
n.y = k
n.x = f
n.z = d
n.w = l
assert n.y.r.s.w.o.txt == "i"