class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: D = None
        self.t: F = None
        self.y: F = None
        self.s: C = None
        self.p: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: C = None
        self.w: E = None
        self.y: B = None
        self.o: E = None
        self.s: E = None
        self.txt = txt

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

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

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

a = A("a")
h = B("h")
c = C("c")
i = D("i")
j = E("j")
e = F("e")
f = G("f")
m = D("m")

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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: C = None
        self.w: E = None
        self.y: B = None
        self.o: E = None
        self.s: E = None
        self.txt = txt

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

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

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

a = A("a")
h = B("h")
c = C("c")
i = D("i")
j = E("j")
e = F("e")
f = G("f")
m = D("m")

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