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

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: C = None
        self.z: F = None
        self.v: D = None
        self.p: B = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: C = None
        self.z: F = None
        self.v: D = None
        self.p: B = None
        self.txt = txt

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

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

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

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