class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: I = None
        self.r: F = None
        self.z: E = None
        self.v: H = None
        self.x: D = None
        self.u: E = None
        self.p: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: F = None
        self.u: D = None
        self.v: H = None
        self.p: E = None
        self.o: I = None
        self.x: F = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: G = None
        self.o: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: I = None
        self.p: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.w: J = None
        self.z: I = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: I = None
        self.y: C = None
        self.w: G = None
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: C = None
        self.u: C = None
        self.t: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: I = None
        self.y: I = None
        self.u: E = None
        self.t: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: F = None
        self.u: D = None
        self.v: H = None
        self.p: E = None
        self.o: I = None
        self.x: F = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: G = None
        self.o: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: I = None
        self.p: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.w: J = None
        self.z: I = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: I = None
        self.y: C = None
        self.w: G = None
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: C = None
        self.u: C = None
        self.t: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: I = None
        self.y: I = None
        self.u: E = None
        self.t: C = None
        self.txt = txt

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

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