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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: G = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: D = None
        self.u: F = None
        self.p: H = None
        self.o: F = None
        self.v: H = None
        self.z: F = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: C = None
        self.z: E = None
        self.q: H = None
        self.r: B = None
        self.u: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: D = None
        self.w: G = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: F = None
        self.u: C = None
        self.s: I = None
        self.q: H = None
        self.x: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: G = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: D = None
        self.u: F = None
        self.p: H = None
        self.o: F = None
        self.v: H = None
        self.z: F = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: C = None
        self.z: E = None
        self.q: H = None
        self.r: B = None
        self.u: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: D = None
        self.w: G = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: F = None
        self.u: C = None
        self.s: I = None
        self.q: H = None
        self.x: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

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