class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: E = None
        self.y: D = None
        self.r: E = None
        self.s: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: F = None
        self.r: F = None
        self.y: B = None
        self.w: A = None
        self.q: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: B = None
        self.t: B = None
        self.r: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: F = None
        self.r: F = None
        self.y: B = None
        self.w: A = None
        self.q: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: B = None
        self.t: B = None
        self.r: H = None
        self.txt = txt

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

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

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

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

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

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