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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: G = None
        self.q: B = None
        self.o: E = None
        self.t: F = None
        self.r: A = None
        self.v: A = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: G = None
        self.q: B = None
        self.o: E = None
        self.t: F = None
        self.r: A = None
        self.v: A = None
        self.txt = txt

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

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

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

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

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