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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: F = None
        self.o: A = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: J = None
        self.o: G = None
        self.y: F = None
        self.v: A = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: F = None
        self.z: G = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: H = None
        self.x: D = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: B = None
        self.o: B = None
        self.v: B = None
        self.p: A = None
        self.u: A = None
        self.s: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: E = None
        self.t: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: F = None
        self.o: A = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: J = None
        self.o: G = None
        self.y: F = None
        self.v: A = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: F = None
        self.z: G = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: H = None
        self.x: D = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: B = None
        self.o: B = None
        self.v: B = None
        self.p: A = None
        self.u: A = None
        self.s: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: E = None
        self.t: D = None
        self.txt = txt

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

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

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