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

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

class C:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: C = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: C = None
        self.txt = txt

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

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

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

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