class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: C = None
        self.w: E = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: A = None
        self.z: J = None
        self.w: B = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: H = None
        self.p: J = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: A = None
        self.o: I = None
        self.u: J = None
        self.q: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: J = None
        self.u: F = None
        self.o: G = None
        self.w: J = None
        self.q: D = None
        self.x: J = None
        self.p: G = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: C = None
        self.w: E = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: A = None
        self.z: J = None
        self.w: B = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: H = None
        self.p: J = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: A = None
        self.o: I = None
        self.u: J = None
        self.q: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: J = None
        self.u: F = None
        self.o: G = None
        self.w: J = None
        self.q: D = None
        self.x: J = None
        self.p: G = None
        self.txt = txt

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

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

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