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

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: C = None
        self.v: D = None
        self.x: C = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: E = None
        self.r: E = None
        self.q: C = None
        self.t: E = None
        self.txt = txt

b = A("b")
i = B("i")
c = C("c")
e = D("e")
k = E("k")
n = B("n")
h = C("h")
d = C("d")
a = E("a")
f = D("f")

b.t = c
b.y = a
b.v = e
i.u = e
i.y = b
c.q = e
c.z = a
c.w = n
c.x = f
c.o = b
e.q = k
e.s = c
e.v = f
e.x = h
e.z = b
k.y = b
k.o = a
k.r = a
k.t = a
k.q = c
n.u = f
n.y = b
h.q = e
h.z = a
h.w = n
h.x = f
h.o = b
d.q = f
d.z = k
d.w = i
d.x = e
d.o = b
a.y = b
a.o = k
a.r = k
a.t = k
a.q = h
f.q = k
f.s = d
f.x = d
f.v = e
f.z = b
assert f.z.t.w.y.t.w.u.v.s.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: E = None
        self.v: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: C = None
        self.v: D = None
        self.x: C = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: E = None
        self.r: E = None
        self.q: C = None
        self.t: E = None
        self.txt = txt

b = A("b")
i = B("i")
c = C("c")
e = D("e")
k = E("k")
n = B("n")
h = C("h")
d = C("d")
a = E("a")
f = D("f")

b.t = c
b.y = a
b.v = e
i.u = e
i.y = b
c.q = e
c.z = a
c.w = n
c.x = f
c.o = b
e.q = k
e.s = c
e.v = f
e.x = h
e.z = b
k.y = b
k.o = a
k.r = a
k.t = a
k.q = c
n.u = f
n.y = b
h.q = e
h.z = a
h.w = n
h.x = f
h.o = b
d.q = f
d.z = k
d.w = i
d.x = e
d.o = b
a.y = b
a.o = k
a.r = k
a.t = k
a.q = h
f.q = k
f.s = d
f.x = d
f.v = e
f.z = b
assert f.z.t.w.y.t.w.u.v.s.txt == "c"