class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: E = None
        self.z: B = None
        self.q: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: H = None
        self.q: D = None
        self.o: D = None
        self.w: E = None
        self.t: I = None
        self.y: E = None
        self.z: G = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: I = None
        self.r: H = None
        self.y: H = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: H = None
        self.p: D = None
        self.v: B = None
        self.w: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: H = None
        self.q: D = None
        self.o: D = None
        self.w: E = None
        self.t: I = None
        self.y: E = None
        self.z: G = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: I = None
        self.r: H = None
        self.y: H = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: H = None
        self.p: D = None
        self.v: B = None
        self.w: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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