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

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

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: E = None
        self.v: A = None
        self.r: G = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: C = None
        self.o: C = None
        self.s: E = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: D = None
        self.txt = txt

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

k = A("k")
e = B("e")
h = C("h")
j = D("j")
m = E("m")
a = F("a")
i = G("i")
l = C("l")
n = E("n")
f = F("f")

k.y = l
e.y = n
e.q = a
h.t = j
h.s = j
h.q = f
h.z = f
h.p = k
j.s = n
j.p = n
j.q = m
j.v = k
j.r = i
m.q = i
m.w = l
m.o = h
m.s = n
m.p = a
a.w = n
a.u = j
i.p = e
i.y = e
i.t = j
i.v = f
i.s = a
l.t = j
l.s = j
l.q = f
l.p = k
l.z = a
n.q = i
n.w = h
n.o = h
n.s = m
n.p = f
f.w = n
f.u = j
assert n.p.u.v.y.p.y.p.y.p.y.txt == "
class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: E = None
        self.v: A = None
        self.r: G = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: C = None
        self.o: C = None
        self.s: E = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: D = None
        self.txt = txt

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

k = A("k")
e = B("e")
h = C("h")
j = D("j")
m = E("m")
a = F("a")
i = G("i")
l = C("l")
n = E("n")
f = F("f")

k.y = l
e.y = n
e.q = a
h.t = j
h.s = j
h.q = f
h.z = f
h.p = k
j.s = n
j.p = n
j.q = m
j.v = k
j.r = i
m.q = i
m.w = l
m.o = h
m.s = n
m.p = a
a.w = n
a.u = j
i.p = e
i.y = e
i.t = j
i.v = f
i.s = a
l.t = j
l.s = j
l.q = f
l.p = k
l.z = a
n.q = i
n.w = h
n.o = h
n.s = m
n.p = f
f.w = n
f.u = j
assert n.p.u.v.y.p.y.p.y.p.y.txt == "l"