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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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