class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: E = None
        self.v: D = None
        self.o: H = None
        self.x: F = None
        self.z: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: A = None
        self.v: G = None
        self.t: F = None
        self.r: A = None
        self.x: D = None
        self.o: G = None
        self.s: I = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: B = None
        self.q: C = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: H = None
        self.v: H = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: H = None
        self.z: C = None
        self.y: A = None
        self.x: B = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: A = None
        self.z: E = None
        self.w: H = None
        self.o: C = None
        self.v: F = None
        self.x: C = None
        self.txt = txt

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

k.u = a
k.q = b
k.v = j
k.o = g
k.z = g
k.x = e
d.r = a
d.v = h
d.q = h
d.s = e
d.z = e
d.w = e
a.q = b
a.w = k
a.r = k
a.v = c
a.o = c
a.t = e
a.x = j
a.y = j
a.s = h
j.y = d
j.w = d
j.q = a
j.r = g
b.x = c
b.z = g
b.v = g
b.t = a
e.o = b
e.w = g
e.z = a
e.y = k
e.x = d
e.q = d
c.v = j
c.o = j
g.s = k
g.w = e
g.t = a
h.s = g
h.w = g
h.t = k
h.z = b
h.o = a
h.x = a
h.v = e
assert b.v.s.v.q.t.w.t.t.w.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: E = None
        self.v: D = None
        self.o: H = None
        self.x: F = None
        self.z: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: A = None
        self.v: G = None
        self.t: F = None
        self.r: A = None
        self.x: D = None
        self.o: G = None
        self.s: I = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: B = None
        self.q: C = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: H = None
        self.v: H = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: H = None
        self.z: C = None
        self.y: A = None
        self.x: B = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: A = None
        self.z: E = None
        self.w: H = None
        self.o: C = None
        self.v: F = None
        self.x: C = None
        self.txt = txt

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

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