class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: H = None
        self.q: F = None
        self.y: G = None
        self.v: B = None
        self.t: D = None
        self.s: J = None
        self.z: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: H = None
        self.w: F = None
        self.s: E = None
        self.p: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: B = None
        self.p: F = None
        self.w: I = None
        self.r: J = None
        self.u: D = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: J = None
        self.y: F = None
        self.x: I = None
        self.v: J = None
        self.o: F = None
        self.p: F = None
        self.t: C = None
        self.q: I = None
        self.u: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

b.o = l
b.y = l
b.p = e
b.q = h
b.v = f
b.t = n
b.s = i
b.z = m
f.t = l
c.x = e
c.w = a
n.u = e
n.o = e
n.w = h
n.s = a
n.p = i
a.s = l
a.v = c
a.r = n
a.w = e
a.y = f
h.y = l
h.r = a
l.q = c
l.v = f
l.p = h
l.w = m
l.r = i
l.u = n
l.y = b
e.z = a
e.s = i
e.v = i
e.y = h
e.o = h
e.p = h
e.x = m
e.q = m
e.t = c
e.u = c
m.y = n
m.v = h
m.s = e
i.z = b
assert a.v.w.v.w.r.p.txt == "
class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: H = None
        self.q: F = None
        self.y: G = None
        self.v: B = None
        self.t: D = None
        self.s: J = None
        self.z: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: H = None
        self.w: F = None
        self.s: E = None
        self.p: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: B = None
        self.p: F = None
        self.w: I = None
        self.r: J = None
        self.u: D = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: J = None
        self.y: F = None
        self.x: I = None
        self.v: J = None
        self.o: F = None
        self.p: F = None
        self.t: C = None
        self.q: I = None
        self.u: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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