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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: H = None
        self.z: H = None
        self.t: A = None
        self.q: A = None
        self.x: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: H = None
        self.u: F = None
        self.t: B = None
        self.x: F = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: B = None
        self.q: I = None
        self.x: A = None
        self.v: H = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: D = None
        self.y: C = None
        self.s: H = None
        self.p: H = None
        self.w: C = None
        self.r: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: H = None
        self.z: H = None
        self.t: A = None
        self.q: A = None
        self.x: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: H = None
        self.u: F = None
        self.t: B = None
        self.x: F = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: B = None
        self.q: I = None
        self.x: A = None
        self.v: H = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: D = None
        self.y: C = None
        self.s: H = None
        self.p: H = None
        self.w: C = None
        self.r: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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