class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: A = None
        self.y: D = None
        self.o: F = None
        self.r: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: G = None
        self.u: D = None
        self.q: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: D = None
        self.s: H = None
        self.y: A = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: H = None
        self.x: H = None
        self.u: C = None
        self.w: H = None
        self.o: C = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: D = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: B = None
        self.v: F = None
        self.u: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: C = None
        self.u: C = None
        self.t: B = None
        self.o: H = None
        self.w: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: G = None
        self.u: D = None
        self.q: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: D = None
        self.s: H = None
        self.y: A = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: H = None
        self.x: H = None
        self.u: C = None
        self.w: H = None
        self.o: C = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: D = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: B = None
        self.v: F = None
        self.u: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: C = None
        self.u: C = None
        self.t: B = None
        self.o: H = None
        self.w: D = None
        self.txt = txt

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

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