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

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: I = None
        self.y: E = None
        self.r: I = None
        self.q: B = None
        self.u: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: B = None
        self.p: B = None
        self.o: B = None
        self.y: B = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: I = None
        self.y: E = None
        self.r: I = None
        self.q: B = None
        self.u: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: B = None
        self.p: B = None
        self.o: B = None
        self.y: B = None
        self.v: C = None
        self.txt = txt

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

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

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

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