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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: E = None
        self.p: D = None
        self.y: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: G = None
        self.o: F = None
        self.q: B = None
        self.u: I = None
        self.t: D = None
        self.x: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: D = None
        self.x: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: E = None
        self.q: G = None
        self.w: A = None
        self.v: E = None
        self.p: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: E = None
        self.p: D = None
        self.y: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: G = None
        self.o: F = None
        self.q: B = None
        self.u: I = None
        self.t: D = None
        self.x: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: D = None
        self.x: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: E = None
        self.q: G = None
        self.w: A = None
        self.v: E = None
        self.p: A = None
        self.txt = txt

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

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