class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: I = None
        self.y: C = None
        self.x: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: A = None
        self.s: I = None
        self.y: C = None
        self.p: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: H = None
        self.o: A = None
        self.u: G = None
        self.t: J = None
        self.v: I = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.s: D = None
        self.x: H = None
        self.w: H = None
        self.y: E = None
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: G = None
        self.r: C = None
        self.u: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: A = None
        self.s: I = None
        self.y: C = None
        self.p: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: H = None
        self.o: A = None
        self.u: G = None
        self.t: J = None
        self.v: I = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.s: D = None
        self.x: H = None
        self.w: H = None
        self.y: E = None
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: G = None
        self.r: C = None
        self.u: C = None
        self.txt = txt

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

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