class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: C = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: C = None
        self.u: E = None
        self.txt = txt

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

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

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