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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: A = None
        self.z: C = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: A = None
        self.z: C = None
        self.q: A = None
        self.txt = txt

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

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

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

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