class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: G = None
        self.v: I = None
        self.s: G = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: J = None
        self.y: J = None
        self.t: F = None
        self.v: H = None
        self.x: H = None
        self.w: I = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: J = None
        self.z: A = None
        self.v: A = None
        self.t: B = None
        self.x: H = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: C = None
        self.x: J = None
        self.w: F = None
        self.y: F = None
        self.u: C = None
        self.o: C = None
        self.q: E = None
        self.v: E = None
        self.z: E = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: B = None
        self.y: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: H = None
        self.p: I = None
        self.q: B = None
        self.u: C = None
        self.z: F = None
        self.w: H = None
        self.x: F = None
        self.s: G = None
        self.r: H = None
        self.txt = txt

i = A("i")
c = B("c")
f = C("f")
e = D("e")
d = E("d")
h = F("h")
g = G("g")
n = H("n")
m = I("m")
k = J("k")

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

class B:
    def __init__(self, txt: str):
        self.o: J = None
        self.y: J = None
        self.t: F = None
        self.v: H = None
        self.x: H = None
        self.w: I = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: J = None
        self.z: A = None
        self.v: A = None
        self.t: B = None
        self.x: H = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: C = None
        self.x: J = None
        self.w: F = None
        self.y: F = None
        self.u: C = None
        self.o: C = None
        self.q: E = None
        self.v: E = None
        self.z: E = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: B = None
        self.y: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: H = None
        self.p: I = None
        self.q: B = None
        self.u: C = None
        self.z: F = None
        self.w: H = None
        self.x: F = None
        self.s: G = None
        self.r: H = None
        self.txt = txt

i = A("i")
c = B("c")
f = C("f")
e = D("e")
d = E("d")
h = F("h")
g = G("g")
n = H("n")
m = I("m")
k = J("k")

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