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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: E = None
        self.q: A = None
        self.x: D = None
        self.u: B = None
        self.r: E = None
        self.t: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: C = None
        self.o: C = None
        self.v: E = None
        self.y: F = None
        self.t: B = None
        self.u: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: E = None
        self.q: A = None
        self.x: D = None
        self.u: B = None
        self.r: E = None
        self.t: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: C = None
        self.o: C = None
        self.v: E = None
        self.y: F = None
        self.t: B = None
        self.u: C = None
        self.txt = txt

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

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