class A:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: A = None
        self.t: B = None
        self.z: F = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: A = None
        self.z: D = None
        self.o: A = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: A = None
        self.z: D = None
        self.o: A = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

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