class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.p: F = None
        self.z: G = None
        self.r: I = None
        self.s: D = None
        self.q: E = None
        self.v: G = None
        self.o: H = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: F = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: F = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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

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