class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: E = None
        self.r: D = None
        self.p: B = None
        self.txt = txt

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

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

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

h = A("h")
l = B("l")
d = C("d")
b = D("b")
g = E("g")
k = F("k")
i = F("i")
e = B("e")
n = C("n")

h.v = k
h.q = g
l.s = h
l.q = e
l.y = e
d.t = n
d.y = g
d.r = b
d.p = e
b.y = l
g.o = e
g.u = b
g.p = k
g.s = k
k.t = i
k.q = l
i.t = k
i.q = e
e.s = h
e.q = l
e.y = l
n.t = d
n.y = g
n.r = b
n.p = e
assert d.r.y.s.q.s.t.t.txt == "
class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: E = None
        self.r: D = None
        self.p: B = None
        self.txt = txt

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

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

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

h = A("h")
l = B("l")
d = C("d")
b = D("b")
g = E("g")
k = F("k")
i = F("i")
e = B("e")
n = C("n")

h.v = k
h.q = g
l.s = h
l.q = e
l.y = e
d.t = n
d.y = g
d.r = b
d.p = e
b.y = l
g.o = e
g.u = b
g.p = k
g.s = k
k.t = i
k.q = l
i.t = k
i.q = e
e.s = h
e.q = l
e.y = l
n.t = d
n.y = g
n.r = b
n.p = e
assert d.r.y.s.q.s.t.t.txt == "k"