class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: H = None
        self.r: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: J = None
        self.r: I = None
        self.t: B = None
        self.v: H = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: A = None
        self.x: C = None
        self.r: A = None
        self.y: F = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.r: I = None
        self.q: D = None
        self.w: D = None
        self.v: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: F = None
        self.q: C = None
        self.p: G = None
        self.w: H = None
        self.v: G = None
        self.s: F = None
        self.z: A = None
        self.o: G = None
        self.txt = txt

l = A("l")
n = B("n")
m = C("m")
j = D("j")
e = E("e")
c = F("c")
h = G("h")
k = H("k")
b = I("b")
i = J("i")

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: J = None
        self.r: I = None
        self.t: B = None
        self.v: H = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: A = None
        self.x: C = None
        self.r: A = None
        self.y: F = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.r: I = None
        self.q: D = None
        self.w: D = None
        self.v: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: F = None
        self.q: C = None
        self.p: G = None
        self.w: H = None
        self.v: G = None
        self.s: F = None
        self.z: A = None
        self.o: G = None
        self.txt = txt

l = A("l")
n = B("n")
m = C("m")
j = D("j")
e = E("e")
c = F("c")
h = G("h")
k = H("k")
b = I("b")
i = J("i")

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