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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: G = None
        self.p: B = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: B = None
        self.s: G = None
        self.t: A = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: G = None
        self.v: F = None
        self.q: B = None
        self.w: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: G = None
        self.p: B = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: B = None
        self.s: G = None
        self.t: A = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: G = None
        self.v: F = None
        self.q: B = None
        self.w: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: D = None
        self.txt = txt

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

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