class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: J = None
        self.z: H = None
        self.p: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: F = None
        self.o: A = None
        self.s: I = None
        self.u: A = None
        self.x: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.w: E = None
        self.x: J = None
        self.s: D = None
        self.r: J = None
        self.z: B = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: F = None
        self.o: A = None
        self.s: I = None
        self.u: A = None
        self.x: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.w: E = None
        self.x: J = None
        self.s: D = None
        self.r: J = None
        self.z: B = None
        self.txt = txt

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

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

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

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

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

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