class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: A = None
        self.t: G = None
        self.z: A = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: G = None
        self.x: F = None
        self.t: C = None
        self.u: C = None
        self.r: F = None
        self.o: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: A = None
        self.u: A = None
        self.p: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: G = None
        self.x: F = None
        self.t: C = None
        self.u: C = None
        self.r: F = None
        self.o: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: A = None
        self.u: A = None
        self.p: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: D = None
        self.txt = txt

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

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