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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: D = None
        self.q: E = None
        self.u: H = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: I = None
        self.v: D = None
        self.x: D = None
        self.o: D = None
        self.u: A = None
        self.w: I = None
        self.p: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: F = None
        self.q: C = None
        self.v: D = None
        self.y: F = None
        self.r: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: D = None
        self.q: E = None
        self.u: H = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: I = None
        self.v: D = None
        self.x: D = None
        self.o: D = None
        self.u: A = None
        self.w: I = None
        self.p: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: F = None
        self.q: C = None
        self.v: D = None
        self.y: F = None
        self.r: A = None
        self.txt = txt

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

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

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

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