class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: I = None
        self.w: C = None
        self.p: B = None
        self.t: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: D = None
        self.s: D = None
        self.p: I = None
        self.o: D = None
        self.z: F = None
        self.y: I = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: C = None
        self.o: G = None
        self.p: F = None
        self.q: C = None
        self.y: J = None
        self.x: F = None
        self.w: B = None
        self.r: C = None
        self.s: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: G = None
        self.o: G = None
        self.s: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: D = None
        self.s: D = None
        self.p: I = None
        self.o: D = None
        self.z: F = None
        self.y: I = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: C = None
        self.o: G = None
        self.p: F = None
        self.q: C = None
        self.y: J = None
        self.x: F = None
        self.w: B = None
        self.r: C = None
        self.s: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: G = None
        self.o: G = None
        self.s: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

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

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