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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: F = None
        self.s: D = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: G = None
        self.s: D = None
        self.u: A = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.q: H = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: B = None
        self.u: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: A = None
        self.t: A = None
        self.o: F = None
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: I = None
        self.t: I = None
        self.u: C = None
        self.v: E = None
        self.z: I = None
        self.o: C = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: H = None
        self.t: E = None
        self.r: D = None
        self.y: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: F = None
        self.s: D = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: G = None
        self.s: D = None
        self.u: A = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.q: H = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: B = None
        self.u: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: A = None
        self.t: A = None
        self.o: F = None
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: I = None
        self.t: I = None
        self.u: C = None
        self.v: E = None
        self.z: I = None
        self.o: C = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: H = None
        self.t: E = None
        self.r: D = None
        self.y: E = None
        self.txt = txt

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

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