class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: G = None
        self.t: B = None
        self.r: F = None
        self.y: D = None
        self.w: B = None
        self.p: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: B = None
        self.t: I = None
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: I = None
        self.w: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: F = None
        self.z: C = None
        self.s: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: B = None
        self.t: I = None
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: I = None
        self.w: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: F = None
        self.z: C = None
        self.s: E = None
        self.txt = txt

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

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