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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: A = None
        self.o: A = None
        self.v: A = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: A = None
        self.o: A = None
        self.v: A = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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

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