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

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

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

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

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

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

k.t = n
g.o = n
g.s = h
g.p = f
h.y = b
j.q = f
j.v = n
j.x = n
n.v = f
f.o = n
f.s = l
f.p = g
d.t = n
b.t = n
c.y = b
l.y = b
assert n.v.o.v.o.v.s.y.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

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

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

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

k.t = n
g.o = n
g.s = h
g.p = f
h.y = b
j.q = f
j.v = n
j.x = n
n.v = f
f.o = n
f.s = l
f.p = g
d.t = n
b.t = n
c.y = b
l.y = b
assert n.v.o.v.o.v.s.y.txt == "b"