class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: C = None
        self.w: E = None
        self.s: E = None
        self.o: I = None
        self.p: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: B = None
        self.t: E = None
        self.s: H = None
        self.r: H = None
        self.p: F = None
        self.y: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: B = None
        self.t: G = None
        self.u: G = None
        self.v: G = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: A = None
        self.t: D = None
        self.z: C = None
        self.x: F = None
        self.q: H = None
        self.s: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: A = None
        self.w: C = None
        self.z: H = None
        self.y: B = None
        self.u: B = None
        self.t: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: B = None
        self.t: E = None
        self.s: H = None
        self.r: H = None
        self.p: F = None
        self.y: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: B = None
        self.t: G = None
        self.u: G = None
        self.v: G = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: A = None
        self.t: D = None
        self.z: C = None
        self.x: F = None
        self.q: H = None
        self.s: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: A = None
        self.w: C = None
        self.z: H = None
        self.y: B = None
        self.u: B = None
        self.t: A = None
        self.txt = txt

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

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