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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: C = None
        self.u: F = None
        self.o: C = None
        self.y: H = None
        self.s: G = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: B = None
        self.w: A = None
        self.q: I = None
        self.t: I = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: G = None
        self.w: B = None
        self.u: E = None
        self.z: G = None
        self.o: F = None
        self.t: E = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: A = None
        self.q: E = None
        self.u: A = None
        self.s: A = None
        self.v: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: C = None
        self.u: F = None
        self.o: C = None
        self.y: H = None
        self.s: G = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: B = None
        self.w: A = None
        self.q: I = None
        self.t: I = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: G = None
        self.w: B = None
        self.u: E = None
        self.z: G = None
        self.o: F = None
        self.t: E = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: A = None
        self.q: E = None
        self.u: A = None
        self.s: A = None
        self.v: C = None
        self.txt = txt

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

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