class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: G = None
        self.q: B = None
        self.s: C = None
        self.w: C = None
        self.x: G = None
        self.u: D = None
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: A = None
        self.p: D = None
        self.t: I = None
        self.z: E = None
        self.r: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: G = None
        self.y: G = None
        self.q: G = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: D = None
        self.u: E = None
        self.w: H = None
        self.v: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: A = None
        self.p: D = None
        self.t: I = None
        self.z: E = None
        self.r: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: G = None
        self.y: G = None
        self.q: G = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: D = None
        self.u: E = None
        self.w: H = None
        self.v: F = None
        self.txt = txt

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

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