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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: D = None
        self.txt = txt

h = A("h")
l = B("l")
m = C("m")
i = D("i")
g = E("g")
j = F("j")
n = G("n")
e = H("e")
a = F("a")

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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: D = None
        self.txt = txt

h = A("h")
l = B("l")
m = C("m")
i = D("i")
g = E("g")
j = F("j")
n = G("n")
e = H("e")
a = F("a")

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