class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: I = None
        self.p: B = None
        self.w: E = None
        self.u: D = None
        self.y: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: F = None
        self.v: H = None
        self.p: I = None
        self.u: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: A = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: A = None
        self.y: G = None
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: E = None
        self.r: E = None
        self.w: B = None
        self.t: F = None
        self.txt = txt

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

d.t = g
d.w = g
d.z = a
d.y = a
d.p = n
d.u = j
n.o = e
n.w = b
n.q = g
n.u = a
n.r = d
b.s = a
b.p = a
b.y = e
b.v = h
b.u = d
j.y = e
j.z = e
j.p = e
j.q = b
j.x = b
j.s = n
g.q = j
g.o = e
e.w = g
e.s = j
i.r = b
i.q = d
i.s = d
h.s = d
h.t = d
h.y = i
h.x = a
a.z = g
a.s = g
a.r = g
a.w = n
a.t = e
assert b.s.s.o.s.s.o.s.s.u.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: I = None
        self.p: B = None
        self.w: E = None
        self.u: D = None
        self.y: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: F = None
        self.v: H = None
        self.p: I = None
        self.u: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: A = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: A = None
        self.y: G = None
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: E = None
        self.r: E = None
        self.w: B = None
        self.t: F = None
        self.txt = txt

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

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