class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: F = None
        self.r: E = None
        self.o: D = None
        self.w: E = None
        self.z: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: F = None
        self.x: F = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: F = None
        self.x: F = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

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