class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: E = None
        self.y: I = None
        self.s: C = None
        self.q: C = None
        self.u: I = None
        self.z: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.v: G = None
        self.t: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: H = None
        self.w: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.v: G = None
        self.t: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: H = None
        self.w: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

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