class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: C = None
        self.v: C = None
        self.u: E = None
        self.o: B = None
        self.r: E = None
        self.txt = txt

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

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

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

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

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

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

i = A("i")
j = B("j")
h = C("h")
c = D("c")
f = E("f")
b = F("b")
n = G("n")
g = C("g")
k = B("k")

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

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

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

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

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

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

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

i = A("i")
j = B("j")
h = C("h")
c = D("c")
f = E("f")
b = F("b")
n = G("n")
g = C("g")
k = B("k")

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