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

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

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

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

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

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

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

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

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

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

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

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

d.t = k
d.s = a
f.o = a
f.s = a
f.y = a
f.p = m
a.o = m
a.w = b
a.r = h
a.z = f
a.v = f
b.u = a
b.r = a
j.t = a
j.p = g
j.s = k
k.t = a
k.p = f
k.s = j
g.o = a
g.s = a
g.y = a
g.p = j
m.t = a
m.p = g
m.s = j
h.t = j
h.s = a
assert f.s.o.s.t.w.u.v.o.txt == "a"