class A:
    def __init__(self, txt: str):
        self.o: J = None
        self.y: J = None
        self.q: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: H = None
        self.q: I = None
        self.v: J = None
        self.o: I = None
        self.x: F = None
        self.p: H = None
        self.w: B = None
        self.y: G = None
        self.u: F = 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.q: I = None
        self.z: I = None
        self.x: F = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: A = None
        self.z: A = None
        self.y: J = None
        self.u: J = None
        self.o: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: E = None
        self.x: B = None
        self.txt = txt

i = A("i")
g = B("g")
e = C("e")
f = D("f")
h = E("h")
l = F("l")
m = G("m")
k = H("k")
a = I("a")
b = J("b")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: H = None
        self.q: I = None
        self.v: J = None
        self.o: I = None
        self.x: F = None
        self.p: H = None
        self.w: B = None
        self.y: G = None
        self.u: F = 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.q: I = None
        self.z: I = None
        self.x: F = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: A = None
        self.z: A = None
        self.y: J = None
        self.u: J = None
        self.o: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: E = None
        self.x: B = None
        self.txt = txt

i = A("i")
g = B("g")
e = C("e")
f = D("f")
h = E("h")
l = F("l")
m = G("m")
k = H("k")
a = I("a")
b = J("b")

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