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

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: F = None
        self.t: F = 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.p: C = None
        self.txt = txt

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

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

c.t = a
h.y = k
h.s = g
h.z = l
b.y = a
b.s = a
b.t = a
l.y = g
n.p = j
a.s = c
a.u = l
a.t = l
a.o = h
a.x = n
k.y = g
g.y = l
g.s = h
g.z = k
j.y = a
j.s = a
j.t = a
assert n.p.y.o.s.y.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: F = None
        self.t: F = 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.p: C = None
        self.txt = txt

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

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

c.t = a
h.y = k
h.s = g
h.z = l
b.y = a
b.s = a
b.t = a
l.y = g
n.p = j
a.s = c
a.u = l
a.t = l
a.o = h
a.x = n
k.y = g
g.y = l
g.s = h
g.z = k
j.y = a
j.s = a
j.t = a
assert n.p.y.o.s.y.y.y.txt == "l"