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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: F = None
        self.txt = txt

i = A("i")
f = B("f")
a = C("a")
c = D("c")
e = E("e")
l = F("l")
n = G("n")
g = E("g")
k = G("k")
d = B("d")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: F = None
        self.txt = txt

i = A("i")
f = B("f")
a = C("a")
c = D("c")
e = E("e")
l = F("l")
n = G("n")
g = E("g")
k = G("k")
d = B("d")

i.r = g
i.o = n
i.x = f
i.z = l
i.p = k
f.s = i
f.x = d
f.p = d
f.z = n
f.t = l
a.r = f
c.s = g
c.o = k
e.v = g
e.y = a
l.z = i
l.r = a
n.p = a
n.o = l
g.v = e
g.y = a
k.p = a
k.o = l
d.s = i
d.x = f
d.p = f
d.z = n
d.t = l
assert f.t.z.x.p.s.o.o.r.r.txt == "f"