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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: E = None
        self.x: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: B = None
        self.r: A = None
        self.y: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: E = None
        self.x: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: B = None
        self.r: A = None
        self.y: D = None
        self.txt = txt

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

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

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

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