class A:
    def __init__(self, txt: str):
        self.o: J = None
        self.r: I = None
        self.s: J = None
        self.u: D = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: F = None
        self.x: J = None
        self.p: B = None
        self.u: F = None
        self.r: E = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: J = None
        self.y: H = None
        self.v: H = None
        self.o: C = None
        self.s: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: E = None
        self.t: I = None
        self.w: D = None
        self.s: A = None
        self.r: E = None
        self.u: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: I = None
        self.w: H = None
        self.x: H = None
        self.q: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: F = None
        self.x: J = None
        self.p: B = None
        self.u: F = None
        self.r: E = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: J = None
        self.y: H = None
        self.v: H = None
        self.o: C = None
        self.s: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: E = None
        self.t: I = None
        self.w: D = None
        self.s: A = None
        self.r: E = None
        self.u: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: I = None
        self.w: H = None
        self.x: H = None
        self.q: E = None
        self.txt = txt

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

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