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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: F = None
        self.w: J = None
        self.p: A = None
        self.q: F = None
        self.y: F = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.w: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: J = None
        self.v: H = None
        self.q: I = None
        self.x: A = None
        self.w: B = None
        self.y: D = None
        self.z: B = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: J = None
        self.z: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: C = None
        self.z: J = None
        self.p: E = None
        self.s: A = None
        self.t: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: E = None
        self.y: B = None
        self.t: G = None
        self.x: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: F = None
        self.w: J = None
        self.p: A = None
        self.q: F = None
        self.y: F = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.w: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: J = None
        self.v: H = None
        self.q: I = None
        self.x: A = None
        self.w: B = None
        self.y: D = None
        self.z: B = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: J = None
        self.z: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: C = None
        self.z: J = None
        self.p: E = None
        self.s: A = None
        self.t: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: E = None
        self.y: B = None
        self.t: G = None
        self.x: I = None
        self.txt = txt

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

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