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

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

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

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

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

j = A("j")
n = B("n")
k = C("k")
b = D("b")
l = E("l")
m = C("m")

j.x = b
j.r = l
j.y = n
j.s = n
j.w = k
n.t = l
k.z = j
k.w = j
k.s = j
k.t = j
k.o = n
b.u = l
b.p = l
l.t = k
l.o = b
l.v = b
l.y = j
l.u = n
m.z = j
m.w = j
m.s = j
m.t = j
m.o = n
assert b.u.t.w.r.t.s.txt == "
class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: E = None
        self.y: B = None
        self.w: C = None
        self.s: B = None
        self.txt = txt

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

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

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

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

j = A("j")
n = B("n")
k = C("k")
b = D("b")
l = E("l")
m = C("m")

j.x = b
j.r = l
j.y = n
j.s = n
j.w = k
n.t = l
k.z = j
k.w = j
k.s = j
k.t = j
k.o = n
b.u = l
b.p = l
l.t = k
l.o = b
l.v = b
l.y = j
l.u = n
m.z = j
m.w = j
m.s = j
m.t = j
m.o = n
assert b.u.t.w.r.t.s.txt == "j"