class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: D = None
        self.x: E = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: I = None
        self.p: J = None
        self.t: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: C = None
        self.r: C = None
        self.x: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: D = None
        self.p: F = None
        self.t: I = None
        self.r: C = None
        self.u: H = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: I = None
        self.p: J = None
        self.t: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: C = None
        self.r: C = None
        self.x: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: D = None
        self.p: F = None
        self.t: I = None
        self.r: C = None
        self.u: H = None
        self.v: F = None
        self.txt = txt

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

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