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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: A = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: A = None
        self.s: A = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: E = None
        self.x: G = None
        self.q: A = None
        self.u: G = None
        self.w: G = None
        self.r: E = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: H = None
        self.s: A = None
        self.w: E = None
        self.o: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: A = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: A = None
        self.s: A = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: E = None
        self.x: G = None
        self.q: A = None
        self.u: G = None
        self.w: G = None
        self.r: E = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: H = None
        self.s: A = None
        self.w: E = None
        self.o: A = None
        self.txt = txt

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

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