class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: H = None
        self.s: B = None
        self.u: H = None
        self.w: G = None
        self.z: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.s: D = None
        self.u: G = None
        self.y: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.r: G = None
        self.p: E = None
        self.u: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: D = None
        self.t: A = None
        self.w: A = None
        self.y: C = None
        self.s: F = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.s: D = None
        self.u: G = None
        self.y: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.r: G = None
        self.p: E = None
        self.u: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: D = None
        self.t: A = None
        self.w: A = None
        self.y: C = None
        self.s: F = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: D = None
        self.txt = txt

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

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