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

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: F = None
        self.r: B = None
        self.z: D = None
        self.u: G = None
        self.x: A = None
        self.y: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: F = None
        self.r: B = None
        self.z: D = None
        self.u: G = None
        self.x: A = None
        self.y: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: E = None
        self.txt = txt

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

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

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