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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.w: I = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: E = None
        self.q: F = None
        self.z: B = None
        self.y: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: A = None
        self.y: A = None
        self.s: E = None
        self.v: D = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.w: I = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: E = None
        self.q: F = None
        self.z: B = None
        self.y: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: A = None
        self.y: A = None
        self.s: E = None
        self.v: D = None
        self.w: C = None
        self.txt = txt

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

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