class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: E = None
        self.s: C = None
        self.x: E = None
        self.y: C = None
        self.txt = txt

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

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

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

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

j = A("j")
l = B("l")
m = C("m")
e = D("e")
h = E("h")
i = D("i")
f = A("f")

j.w = l
j.q = h
j.x = h
j.s = m
j.y = m
l.t = m
m.t = l
m.o = l
e.w = l
e.y = m
e.s = h
h.u = j
i.w = l
i.y = m
i.s = h
f.w = l
f.q = h
f.x = h
f.s = m
f.y = m
assert i.s.u.y.t.t.txt == "
class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: E = None
        self.s: C = None
        self.x: E = None
        self.y: C = None
        self.txt = txt

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

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

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

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

j = A("j")
l = B("l")
m = C("m")
e = D("e")
h = E("h")
i = D("i")
f = A("f")

j.w = l
j.q = h
j.x = h
j.s = m
j.y = m
l.t = m
m.t = l
m.o = l
e.w = l
e.y = m
e.s = h
h.u = j
i.w = l
i.y = m
i.s = h
f.w = l
f.q = h
f.x = h
f.s = m
f.y = m
assert i.s.u.y.t.t.txt == "m"