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

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

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: F = None
        self.q: E = None
        self.y: E = None
        self.v: F = None
        self.o: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: D = None
        self.r: E = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: F = None
        self.txt = txt

j = A("j")
h = B("h")
l = C("l")
c = D("c")
i = E("i")
n = F("n")
d = E("d")
e = F("e")
g = E("g")
f = D("f")

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: F = None
        self.q: E = None
        self.y: E = None
        self.v: F = None
        self.o: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: D = None
        self.r: E = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: F = None
        self.txt = txt

j = A("j")
h = B("h")
l = C("l")
c = D("c")
i = E("i")
n = F("n")
d = E("d")
e = F("e")
g = E("g")
f = D("f")

j.t = f
h.o = l
l.y = c
c.t = e
c.p = e
c.v = e
c.q = g
c.y = g
c.o = f
i.t = c
i.x = c
i.w = c
i.r = d
n.s = e
n.v = e
d.t = c
d.x = c
d.r = i
d.w = f
e.s = n
e.v = n
g.t = f
g.x = f
g.r = d
g.w = c
f.t = n
f.p = n
f.v = n
f.q = d
f.y = g
f.o = c
assert n.v.s.v.v.v.v.v.s.txt == "n"