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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: F = None
        self.o: G = None
        self.s: A = None
        self.u: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: I = None
        self.y: D = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.v: B = None
        self.q: B = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: F = None
        self.o: G = None
        self.s: A = None
        self.u: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: I = None
        self.y: D = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.v: B = None
        self.q: B = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: H = None
        self.txt = txt

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

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