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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: E = None
        self.p: F = None
        self.w: A = None
        self.v: F = None
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: B = None
        self.v: B = None
        self.p: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: B = None
        self.z: H = None
        self.t: H = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: E = None
        self.p: F = None
        self.w: A = None
        self.v: F = None
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: B = None
        self.v: B = None
        self.p: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: B = None
        self.z: H = None
        self.t: H = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: B = None
        self.txt = txt

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

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

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

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