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

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: A = None
        self.z: B = None
        self.s: C = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: D = None
        self.q: A = None
        self.r: C = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: A = None
        self.z: B = None
        self.s: C = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: D = None
        self.q: A = None
        self.r: C = None
        self.w: A = None
        self.txt = txt

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

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

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

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