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

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: B = None
        self.s: D = None
        self.p: D = None
        self.t: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: G = None
        self.x: D = None
        self.s: C = None
        self.z: H = None
        self.t: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: B = None
        self.w: I = None
        self.u: B = None
        self.r: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: B = None
        self.s: D = None
        self.p: D = None
        self.t: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: G = None
        self.x: D = None
        self.s: C = None
        self.z: H = None
        self.t: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: B = None
        self.w: I = None
        self.u: B = None
        self.r: B = None
        self.txt = txt

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

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