class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: F = None
        self.v: E = None
        self.y: I = None
        self.x: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: B = None
        self.q: G = None
        self.z: D = None
        self.p: H = None
        self.x: E = None
        self.o: H = None
        self.y: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: F = None
        self.q: I = None
        self.p: C = None
        self.o: E = None
        self.r: F = None
        self.v: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: F = None
        self.v: E = None
        self.y: I = None
        self.x: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: B = None
        self.q: G = None
        self.z: D = None
        self.p: H = None
        self.x: E = None
        self.o: H = None
        self.y: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: F = None
        self.q: I = None
        self.p: C = None
        self.o: E = None
        self.r: F = None
        self.v: A = None
        self.txt = txt

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

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

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

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