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

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

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: B = None
        self.u: C = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: F = None
        self.u: D = None
        self.r: D = None
        self.t: D = None
        self.o: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: E = None
        self.t: B = None
        self.v: B = None
        self.s: A = None
        self.r: C = None
        self.y: A = None
        self.txt = txt

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

m = A("m")
h = B("h")
j = C("j")
l = D("l")
n = E("n")
d = F("d")
b = G("b")
g = E("g")
c = G("c")
e = A("e")

m.s = e
m.v = d
m.y = l
h.u = b
h.q = j
h.s = e
j.u = b
j.q = h
j.w = m
l.p = m
l.o = h
l.u = j
l.z = b
n.x = j
n.y = d
n.u = l
n.r = l
n.t = l
n.o = g
d.p = j
d.r = j
d.q = g
d.t = h
d.v = h
d.s = m
d.y = e
b.w = h
b.x = h
b.p = d
b.v = d
b.z = j
b.o = l
b.q = e
g.x = j
g.y = d
g.u = l
g.r = l
g.t = l
g.o = n
c.w = h
c.x = h
c.p = d
c.v = d
c.z = j
c.o = l
c.q = e
e.s = m
e.v = d
e.y = l
assert d.q.u.p.v.y.s.v.p.w.y.txt == "
class A:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: F = None
        self.y: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: B = None
        self.u: C = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: F = None
        self.u: D = None
        self.r: D = None
        self.t: D = None
        self.o: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: E = None
        self.t: B = None
        self.v: B = None
        self.s: A = None
        self.r: C = None
        self.y: A = None
        self.txt = txt

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

m = A("m")
h = B("h")
j = C("j")
l = D("l")
n = E("n")
d = F("d")
b = G("b")
g = E("g")
c = G("c")
e = A("e")

m.s = e
m.v = d
m.y = l
h.u = b
h.q = j
h.s = e
j.u = b
j.q = h
j.w = m
l.p = m
l.o = h
l.u = j
l.z = b
n.x = j
n.y = d
n.u = l
n.r = l
n.t = l
n.o = g
d.p = j
d.r = j
d.q = g
d.t = h
d.v = h
d.s = m
d.y = e
b.w = h
b.x = h
b.p = d
b.v = d
b.z = j
b.o = l
b.q = e
g.x = j
g.y = d
g.u = l
g.r = l
g.t = l
g.o = n
c.w = h
c.x = h
c.p = d
c.v = d
c.z = j
c.o = l
c.q = e
e.s = m
e.v = d
e.y = l
assert d.q.u.p.v.y.s.v.p.w.y.txt == "l"