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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: E = None
        self.w: J = None
        self.o: G = None
        self.t: J = None
        self.u: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: G = None
        self.v: F = None
        self.y: I = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: C = None
        self.u: H = None
        self.q: G = None
        self.w: H = None
        self.y: A = None
        self.x: E = None
        self.v: A = None
        self.p: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: E = None
        self.w: J = None
        self.o: G = None
        self.t: J = None
        self.u: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: G = None
        self.v: F = None
        self.y: I = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: C = None
        self.u: H = None
        self.q: G = None
        self.w: H = None
        self.y: A = None
        self.x: E = None
        self.v: A = None
        self.p: C = None
        self.txt = txt

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

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