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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: J = None
        self.r: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: J = None
        self.y: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: C = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: J = None
        self.r: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: J = None
        self.y: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: C = None
        self.txt = txt

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

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

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

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