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

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

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: H = None
        self.w: B = None
        self.s: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: A = None
        self.o: D = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: G = None
        self.r: C = None
        self.x: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.x: E = None
        self.v: C = None
        self.r: C = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: H = None
        self.w: B = None
        self.s: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: A = None
        self.o: D = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: G = None
        self.r: C = None
        self.x: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.x: E = None
        self.v: C = None
        self.r: C = None
        self.txt = txt

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

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

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

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