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

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: G = None
        self.u: A = None
        self.x: D = None
        self.q: H = None
        self.p: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: I = None
        self.p: H = None
        self.o: G = None
        self.t: A = None
        self.w: D = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: B = None
        self.u: D = None
        self.t: C = None
        self.p: E = None
        self.v: F = None
        self.y: F = None
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: G = None
        self.s: G = None
        self.t: F = None
        self.r: F = None
        self.x: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: G = None
        self.u: A = None
        self.x: D = None
        self.q: H = None
        self.p: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: I = None
        self.p: H = None
        self.o: G = None
        self.t: A = None
        self.w: D = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: B = None
        self.u: D = None
        self.t: C = None
        self.p: E = None
        self.v: F = None
        self.y: F = None
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: G = None
        self.s: G = None
        self.t: F = None
        self.r: F = None
        self.x: C = None
        self.txt = txt

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

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