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

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

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: E = None
        self.r: H = None
        self.y: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: F = None
        self.u: D = None
        self.z: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: B = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: B = None
        self.y: B = None
        self.s: I = None
        self.z: H = None
        self.t: G = None
        self.p: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: E = None
        self.r: H = None
        self.y: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: F = None
        self.u: D = None
        self.z: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: B = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: B = None
        self.y: B = None
        self.s: I = None
        self.z: H = None
        self.t: G = None
        self.p: B = None
        self.txt = txt

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

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

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

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