class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: B = None
        self.s: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: B = None
        self.z: C = None
        self.v: F = None
        self.s: E = None
        self.y: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: A = None
        self.z: B = None
        self.x: C = None
        self.y: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: F = None
        self.r: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: B = None
        self.z: C = None
        self.v: F = None
        self.s: E = None
        self.y: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: A = None
        self.z: B = None
        self.x: C = None
        self.y: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: F = None
        self.r: D = None
        self.txt = txt

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

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