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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: A = None
        self.o: F = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: B = None
        self.y: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: J = None
        self.t: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: I = None
        self.s: C = None
        self.x: J = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: A = None
        self.o: F = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: B = None
        self.y: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: J = None
        self.t: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: I = None
        self.s: C = None
        self.x: J = None
        self.txt = txt

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

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

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

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