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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: C = None
        self.y: E = None
        self.t: A = None
        self.s: B = None
        self.txt = txt

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

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

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

i = A("i")
d = B("d")
e = C("e")
l = D("l")
m = E("m")
c = B("c")

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: C = None
        self.y: E = None
        self.t: A = None
        self.s: B = None
        self.txt = txt

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

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

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

i = A("i")
d = B("d")
e = C("e")
l = D("l")
m = E("m")
c = B("c")

i.u = e
i.y = e
i.v = e
i.s = l
i.w = m
d.u = e
d.o = e
d.y = m
d.t = i
d.s = c
e.p = i
e.u = i
e.v = m
e.x = d
l.y = c
l.w = e
m.r = e
m.u = e
m.w = d
c.u = e
c.o = e
c.y = m
c.t = i
c.s = d
assert i.s.w.u.u.v.txt == "m"