class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: A = None
        self.y: B = None
        self.x: E = None
        self.t: B = None
        self.txt = txt

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

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

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

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

b = A("b")
e = B("e")
g = C("g")
l = D("l")
f = E("f")
j = B("j")
h = A("h")
a = B("a")
m = B("m")

b.v = m
b.y = m
b.w = h
b.x = f
b.t = j
e.z = g
e.t = b
e.x = b
g.w = h
g.o = a
g.x = l
l.z = g
l.w = f
l.s = b
l.u = a
f.z = j
f.r = b
f.u = l
j.z = g
j.t = b
j.x = b
h.v = a
h.y = a
h.w = b
h.x = f
h.t = j
a.z = g
a.t = h
a.x = h
m.z = g
m.t = h
m.x = h
assert b.w.w.t.t.w.t.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: A = None
        self.y: B = None
        self.x: E = None
        self.t: B = None
        self.txt = txt

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

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

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

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

b = A("b")
e = B("e")
g = C("g")
l = D("l")
f = E("f")
j = B("j")
h = A("h")
a = B("a")
m = B("m")

b.v = m
b.y = m
b.w = h
b.x = f
b.t = j
e.z = g
e.t = b
e.x = b
g.w = h
g.o = a
g.x = l
l.z = g
l.w = f
l.s = b
l.u = a
f.z = j
f.r = b
f.u = l
j.z = g
j.t = b
j.x = b
h.v = a
h.y = a
h.w = b
h.x = f
h.t = j
a.z = g
a.t = h
a.x = h
m.z = g
m.t = h
m.x = h
assert b.w.w.t.t.w.t.txt == "j"