class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: F = None
        self.z: G = None
        self.x: B = None
        self.v: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: A = None
        self.s: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: B = None
        self.t: H = None
        self.r: H = None
        self.v: G = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: A = None
        self.s: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: B = None
        self.t: H = None
        self.r: H = None
        self.v: G = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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