class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: J = None
        self.u: J = None
        self.w: H = None
        self.o: J = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: H = None
        self.y: G = None
        self.u: B = None
        self.p: D = None
        self.r: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: H = None
        self.x: A = None
        self.u: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: I = None
        self.u: A = None
        self.v: B = None
        self.p: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: I = None
        self.v: E = None
        self.o: A = None
        self.z: A = None
        self.w: D = None
        self.t: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: J = None
        self.u: J = None
        self.w: H = None
        self.o: J = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: H = None
        self.y: G = None
        self.u: B = None
        self.p: D = None
        self.r: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: H = None
        self.x: A = None
        self.u: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: I = None
        self.u: A = None
        self.v: B = None
        self.p: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: I = None
        self.v: E = None
        self.o: A = None
        self.z: A = None
        self.w: D = None
        self.t: H = None
        self.txt = txt

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

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