class A:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: C = None
        self.q: J = None
        self.x: A = None
        self.z: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: I = None
        self.w: I = None
        self.z: B = None
        self.s: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: I = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: J = None
        self.o: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: D = None
        self.v: F = None
        self.o: I = None
        self.w: J = None
        self.r: J = None
        self.u: I = None
        self.x: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: C = None
        self.w: B = None
        self.u: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: C = None
        self.q: J = None
        self.x: A = None
        self.z: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: I = None
        self.w: I = None
        self.z: B = None
        self.s: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: I = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: J = None
        self.o: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: D = None
        self.v: F = None
        self.o: I = None
        self.w: J = None
        self.r: J = None
        self.u: I = None
        self.x: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: C = None
        self.w: B = None
        self.u: D = None
        self.txt = txt

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

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

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