class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: B = None
        self.o: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: F = None
        self.w: G = None
        self.r: C = None
        self.o: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: I = None
        self.z: D = None
        self.u: D = None
        self.p: E = None
        self.w: E = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: B = None
        self.x: G = None
        self.q: I = None
        self.y: D = None
        self.p: C = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: A = None
        self.q: G = None
        self.u: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: F = None
        self.w: G = None
        self.r: C = None
        self.o: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: I = None
        self.z: D = None
        self.u: D = None
        self.p: E = None
        self.w: E = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: B = None
        self.x: G = None
        self.q: I = None
        self.y: D = None
        self.p: C = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: A = None
        self.q: G = None
        self.u: C = None
        self.txt = txt

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

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