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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: A = None
        self.y: H = None
        self.q: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: B = None
        self.t: E = None
        self.q: I = None
        self.w: E = None
        self.s: A = None
        self.r: A = None
        self.p: I = None
        self.o: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: B = None
        self.w: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: A = None
        self.y: H = None
        self.q: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: B = None
        self.t: E = None
        self.q: I = None
        self.w: E = None
        self.s: A = None
        self.r: A = None
        self.p: I = None
        self.o: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: B = None
        self.w: D = None
        self.txt = txt

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

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