class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: H = None
        self.w: H = None
        self.s: D = None
        self.p: C = None
        self.u: I = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: E = None
        self.u: G = None
        self.z: F = None
        self.p: I = None
        self.s: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: H = None
        self.w: H = None
        self.s: D = None
        self.p: C = None
        self.u: I = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: E = None
        self.u: G = None
        self.z: F = None
        self.p: I = None
        self.s: E = None
        self.txt = txt

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

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

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