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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: H = None
        self.s: H = None
        self.p: D = None
        self.x: G = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: B = None
        self.o: C = None
        self.p: D = None
        self.v: D = None
        self.x: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: F = None
        self.z: H = None
        self.s: D = None
        self.o: F = None
        self.txt = txt

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

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

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

g = A("g")
k = B("k")
a = C("a")
b = D("b")
m = E("m")
i = F("i")
e = G("e")
d = H("d")
l = C("l")

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: H = None
        self.s: H = None
        self.p: D = None
        self.x: G = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: B = None
        self.o: C = None
        self.p: D = None
        self.v: D = None
        self.x: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: F = None
        self.z: H = None
        self.s: D = None
        self.o: F = None
        self.txt = txt

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

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

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

g = A("g")
k = B("k")
a = C("a")
b = D("b")
m = E("m")
i = F("i")
e = G("e")
d = H("d")
l = C("l")

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