class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: B = None
        self.p: F = None
        self.z: C = None
        self.y: D = None
        self.w: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: B = None
        self.x: D = None
        self.y: A = None
        self.q: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: B = None
        self.p: F = None
        self.z: C = None
        self.y: D = None
        self.w: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: B = None
        self.x: D = None
        self.y: A = None
        self.q: F = None
        self.txt = txt

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

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