class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: E = None
        self.x: G = None
        self.z: D = None
        self.o: H = None
        self.s: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: I = None
        self.z: D = None
        self.w: D = None
        self.o: I = None
        self.x: F = None
        self.y: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: A = None
        self.t: D = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: B = None
        self.p: A = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: A = None
        self.y: F = None
        self.w: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: E = None
        self.x: G = None
        self.z: D = None
        self.o: H = None
        self.s: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: I = None
        self.z: D = None
        self.w: D = None
        self.o: I = None
        self.x: F = None
        self.y: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: A = None
        self.t: D = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: B = None
        self.p: A = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: A = None
        self.y: F = None
        self.w: D = None
        self.txt = txt

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

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