class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: F = None
        self.o: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: D = None
        self.s: B = None
        self.v: A = None
        self.p: F = None
        self.o: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: E = None
        self.u: D = None
        self.txt = txt

f = A("f")
c = B("c")
e = C("e")
m = D("m")
k = E("k")
g = F("g")
i = G("i")

f.y = g
f.z = g
f.o = i
c.s = g
e.q = i
e.s = i
m.x = f
m.t = f
m.o = k
m.z = c
m.q = c
m.v = i
k.t = f
k.v = f
k.o = f
k.q = m
k.s = c
k.p = g
g.z = c
i.z = c
i.x = k
i.u = m
assert f.y.z.s.z.s.txt == "
class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: F = None
        self.o: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: D = None
        self.s: B = None
        self.v: A = None
        self.p: F = None
        self.o: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: E = None
        self.u: D = None
        self.txt = txt

f = A("f")
c = B("c")
e = C("e")
m = D("m")
k = E("k")
g = F("g")
i = G("i")

f.y = g
f.z = g
f.o = i
c.s = g
e.q = i
e.s = i
m.x = f
m.t = f
m.o = k
m.z = c
m.q = c
m.v = i
k.t = f
k.v = f
k.o = f
k.q = m
k.s = c
k.p = g
g.z = c
i.z = c
i.x = k
i.u = m
assert f.y.z.s.z.s.txt == "g"