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

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

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

class D:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: H = None
        self.y: D = None
        self.x: B = None
        self.p: E = None
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: C = None
        self.s: A = None
        self.q: E = None
        self.x: A = None
        self.w: G = None
        self.t: H = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: B = None
        self.r: A = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: H = None
        self.y: D = None
        self.x: B = None
        self.p: E = None
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: C = None
        self.s: A = None
        self.q: E = None
        self.x: A = None
        self.w: G = None
        self.t: H = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: B = None
        self.r: A = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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

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