class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: I = None
        self.q: E = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: C = None
        self.u: C = None
        self.v: G = None
        self.r: D = None
        self.o: H = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: C = None
        self.u: C = None
        self.v: G = None
        self.r: D = None
        self.o: H = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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