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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: C = None
        self.r: A = None
        self.s: F = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.u: D = None
        self.y: F = None
        self.v: G = None
        self.w: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: I = None
        self.r: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: H = None
        self.z: G = None
        self.r: F = None
        self.v: A = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: G = None
        self.p: F = None
        self.s: I = None
        self.z: B = None
        self.q: B = None
        self.u: C = None
        self.t: I = None
        self.w: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: C = None
        self.r: A = None
        self.s: F = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.u: D = None
        self.y: F = None
        self.v: G = None
        self.w: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: I = None
        self.r: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: H = None
        self.z: G = None
        self.r: F = None
        self.v: A = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: G = None
        self.p: F = None
        self.s: I = None
        self.z: B = None
        self.q: B = None
        self.u: C = None
        self.t: I = None
        self.w: E = None
        self.txt = txt

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

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

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