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

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

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: A = None
        self.txt = txt

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

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

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