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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: F = None
        self.s: I = None
        self.z: E = None
        self.x: C = None
        self.w: A = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: F = None
        self.o: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: F = None
        self.s: H = None
        self.x: C = None
        self.z: A = None
        self.p: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: H = None
        self.u: C = None
        self.v: H = None
        self.q: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: F = None
        self.s: I = None
        self.z: E = None
        self.x: C = None
        self.w: A = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: F = None
        self.o: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: F = None
        self.s: H = None
        self.x: C = None
        self.z: A = None
        self.p: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: H = None
        self.u: C = None
        self.v: H = None
        self.q: H = None
        self.txt = txt

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

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