class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: G = None
        self.s: J = None
        self.r: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: C = None
        self.x: H = None
        self.z: G = None
        self.t: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: C = None
        self.x: G = None
        self.r: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: D = None
        self.w: B = None
        self.t: D = None
        self.s: D = None
        self.z: A = None
        self.o: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: E = None
        self.r: F = None
        self.w: D = None
        self.s: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: C = None
        self.x: H = None
        self.z: G = None
        self.t: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: C = None
        self.x: G = None
        self.r: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: D = None
        self.w: B = None
        self.t: D = None
        self.s: D = None
        self.z: A = None
        self.o: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: E = None
        self.r: F = None
        self.w: D = None
        self.s: C = None
        self.txt = txt

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

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

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