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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: C = None
        self.q: I = None
        self.v: I = None
        self.x: D = None
        self.u: B = None
        self.o: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: F = None
        self.s: I = None
        self.txt = txt

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

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

g.y = l
g.p = i
g.r = i
g.s = i
g.o = f
g.t = j
g.u = d
g.v = d
m.o = g
m.q = l
f.v = g
e.w = f
e.z = g
l.x = h
h.t = i
h.r = f
h.q = j
h.v = j
h.x = e
h.u = m
h.o = g
d.z = l
d.v = h
i.o = d
i.t = h
i.s = j
j.q = l
j.p = l
j.y = i
j.v = e
j.x = f
assert e.w.v.o.txt == "
class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: H = None
        self.r: H = None
        self.o: C = None
        self.t: I = None
        self.u: G = None
        self.s: H = None
        self.v: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: C = None
        self.q: I = None
        self.v: I = None
        self.x: D = None
        self.u: B = None
        self.o: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: F = None
        self.s: I = None
        self.txt = txt

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

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

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