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

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

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

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

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

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

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

c = A("c")
j = B("j")
h = C("h")
m = D("m")
l = E("l")
a = F("a")
g = G("g")
k = A("k")
f = B("f")

c.y = h
c.u = j
c.z = m
j.s = h
j.z = f
j.q = l
h.v = a
h.o = a
h.y = k
h.z = g
m.o = l
m.y = a
m.q = h
m.u = h
l.u = a
a.q = l
g.w = a
g.o = h
g.q = f
k.y = h
k.u = j
k.z = m
f.s = h
f.z = j
f.q = l
assert m.o.u.q.u.q.u.txt == "
class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: B = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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

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

c = A("c")
j = B("j")
h = C("h")
m = D("m")
l = E("l")
a = F("a")
g = G("g")
k = A("k")
f = B("f")

c.y = h
c.u = j
c.z = m
j.s = h
j.z = f
j.q = l
h.v = a
h.o = a
h.y = k
h.z = g
m.o = l
m.y = a
m.q = h
m.u = h
l.u = a
a.q = l
g.w = a
g.o = h
g.q = f
k.y = h
k.u = j
k.z = m
f.s = h
f.z = j
f.q = l
assert m.o.u.q.u.q.u.txt == "a"