class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: E = None
        self.v: H = None
        self.u: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.z: G = None
        self.w: G = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: G = None
        self.p: C = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: G = None
        self.y: G = None
        self.s: B = None
        self.q: B = None
        self.w: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.z: G = None
        self.w: G = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: G = None
        self.p: C = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: G = None
        self.y: G = None
        self.s: B = None
        self.q: B = None
        self.w: C = None
        self.txt = txt

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

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