class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: B = None
        self.u: B = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: E = None
        self.t: A = None
        self.s: I = None
        self.x: E = None
        self.r: E = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: E = None
        self.z: C = None
        self.txt = txt

h = A("h")
b = B("b")
c = C("c")
e = D("e")
g = E("g")
k = F("k")
f = G("f")
n = H("n")
j = I("j")

h.q = n
h.o = b
h.u = b
b.y = f
b.t = f
b.q = h
b.u = k
b.s = k
c.u = h
c.w = e
c.q = e
c.s = b
c.z = f
e.v = h
g.x = h
k.o = e
k.q = e
k.z = e
k.v = e
k.y = f
k.s = h
k.x = h
f.v = k
n.u = k
n.o = g
n.x = g
n.r = g
n.y = g
n.t = h
n.s = j
j.u = g
j.t = g
j.z = c
assert c.w.v.q.t.o.t.v.o.txt == "
class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: B = None
        self.u: B = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: E = None
        self.t: A = None
        self.s: I = None
        self.x: E = None
        self.r: E = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: E = None
        self.z: C = None
        self.txt = txt

h = A("h")
b = B("b")
c = C("c")
e = D("e")
g = E("g")
k = F("k")
f = G("f")
n = H("n")
j = I("j")

h.q = n
h.o = b
h.u = b
b.y = f
b.t = f
b.q = h
b.u = k
b.s = k
c.u = h
c.w = e
c.q = e
c.s = b
c.z = f
e.v = h
g.x = h
k.o = e
k.q = e
k.z = e
k.v = e
k.y = f
k.s = h
k.x = h
f.v = k
n.u = k
n.o = g
n.x = g
n.r = g
n.y = g
n.t = h
n.s = j
j.u = g
j.t = g
j.z = c
assert c.w.v.q.t.o.t.v.o.txt == "e"