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

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: C = None
        self.r: B = None
        self.z: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: C = None
        self.r: B = None
        self.z: B = None
        self.txt = txt

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

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

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

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