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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: G = None
        self.z: D = None
        self.v: G = None
        self.y: G = None
        self.r: F = None
        self.u: G = None
        self.x: G = None
        self.o: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: J = None
        self.x: B = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.t: C = None
        self.w: I = None
        self.r: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: G = None
        self.z: D = None
        self.v: G = None
        self.y: G = None
        self.r: F = None
        self.u: G = None
        self.x: G = None
        self.o: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: J = None
        self.x: B = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.t: C = None
        self.w: I = None
        self.r: D = None
        self.txt = txt

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

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

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

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