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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: D = None
        self.s: D = None
        self.z: D = None
        self.r: G = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: D = None
        self.u: B = None
        self.z: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: D = None
        self.t: F = None
        self.p: D = None
        self.q: F = None
        self.txt = txt

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

f.s = d
f.v = d
f.r = j
f.y = c
f.p = i
d.p = g
d.r = g
d.o = j
d.s = j
d.z = j
d.w = i
a.t = j
a.s = j
a.u = d
a.z = d
j.s = i
j.p = g
i.z = f
c.r = g
c.u = g
c.o = d
c.y = d
c.z = k
g.s = i
g.y = j
g.p = j
g.t = c
g.q = k
k.r = g
k.u = g
k.o = d
k.y = d
k.z = c
assert f.r.s.z.v.s.s.z.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: D = None
        self.v: B = None
        self.y: F = None
        self.p: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: D = None
        self.s: D = None
        self.z: D = None
        self.r: G = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: D = None
        self.u: B = None
        self.z: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: D = None
        self.t: F = None
        self.p: D = None
        self.q: F = None
        self.txt = txt

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

f.s = d
f.v = d
f.r = j
f.y = c
f.p = i
d.p = g
d.r = g
d.o = j
d.s = j
d.z = j
d.w = i
a.t = j
a.s = j
a.u = d
a.z = d
j.s = i
j.p = g
i.z = f
c.r = g
c.u = g
c.o = d
c.y = d
c.z = k
g.s = i
g.y = j
g.p = j
g.t = c
g.q = k
k.r = g
k.u = g
k.o = d
k.y = d
k.z = c
assert f.r.s.z.v.s.s.z.txt == "f"