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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: H = None
        self.v: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: G = None
        self.z: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: H = None
        self.v: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: G = None
        self.z: F = None
        self.txt = txt

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

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