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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: G = None
        self.r: I = None
        self.w: D = None
        self.x: D = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: G = None
        self.r: B = None
        self.o: F = None
        self.t: G = None
        self.x: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: G = None
        self.r: I = None
        self.w: D = None
        self.x: D = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: G = None
        self.r: B = None
        self.o: F = None
        self.t: G = None
        self.x: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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

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