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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: B = None
        self.y: G = None
        self.r: A = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: C = None
        self.o: A = None
        self.r: A = None
        self.txt = txt

f = A("f")
g = B("g")
i = C("i")
m = D("m")
a = E("a")
h = F("h")
d = G("d")
e = A("e")
n = B("n")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: B = None
        self.y: G = None
        self.r: A = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: C = None
        self.o: A = None
        self.r: A = None
        self.txt = txt

f = A("f")
g = B("g")
i = C("i")
m = D("m")
a = E("a")
h = F("h")
d = G("d")
e = A("e")
n = B("n")

f.t = d
f.y = h
f.o = h
f.x = h
f.r = i
f.z = n
f.s = a
g.x = a
g.u = a
g.w = h
i.p = a
i.x = e
i.v = f
i.s = h
m.p = g
m.z = d
m.r = d
m.o = h
m.s = e
m.x = i
a.w = m
a.p = g
a.y = d
a.r = f
a.x = i
h.z = m
h.v = g
d.w = n
d.u = i
d.o = e
d.r = f
e.t = d
e.y = h
e.o = h
e.x = h
e.r = i
e.z = g
e.s = a
n.x = a
n.u = a
n.w = h
assert d.w.w.v.u.r.txt == "f"