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

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

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

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

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

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

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

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

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

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

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

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

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