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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: E = None
        self.z: I = None
        self.p: B = None
        self.r: H = None
        self.s: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: J = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: E = None
        self.z: I = None
        self.p: B = None
        self.r: H = None
        self.s: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: J = None
        self.txt = txt

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

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

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