class A:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: D = None
        self.p: D = None
        self.v: F = None
        self.r: B = None
        self.w: I = None
        self.u: G = None
        self.s: E = None
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: C = None
        self.p: I = None
        self.s: H = None
        self.y: F = None
        self.w: I = None
        self.q: G = None
        self.u: G = None
        self.x: G = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: E = None
        self.u: I = None
        self.z: F = None
        self.p: F = None
        self.v: H = None
        self.r: C = None
        self.q: A = None
        self.y: G = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: H = None
        self.p: D = None
        self.t: B = None
        self.x: A = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: J = None
        self.q: I = None
        self.s: D = None
        self.o: J = None
        self.x: D = None
        self.w: F = None
        self.p: I = None
        self.r: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

n = A("n")
g = B("g")
f = C("f")
l = D("l")
h = E("h")
k = F("k")
b = G("b")
i = H("i")
j = I("j")
a = J("a")

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: C = None
        self.p: I = None
        self.s: H = None
        self.y: F = None
        self.w: I = None
        self.q: G = None
        self.u: G = None
        self.x: G = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: E = None
        self.u: I = None
        self.z: F = None
        self.p: F = None
        self.v: H = None
        self.r: C = None
        self.q: A = None
        self.y: G = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: H = None
        self.p: D = None
        self.t: B = None
        self.x: A = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: J = None
        self.q: I = None
        self.s: D = None
        self.o: J = None
        self.x: D = None
        self.w: F = None
        self.p: I = None
        self.r: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

n = A("n")
g = B("g")
f = C("f")
l = D("l")
h = E("h")
k = F("k")
b = G("b")
i = H("i")
j = I("j")
a = J("a")

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