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

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

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: E = None
        self.q: D = None
        self.v: C = None
        self.p: E = None
        self.w: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: E = None
        self.q: D = None
        self.v: C = None
        self.p: E = None
        self.w: D = None
        self.txt = txt

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

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