class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: G = None
        self.x: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: A = None
        self.x: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: A = None
        self.u: B = None
        self.q: B = None
        self.v: C = None
        self.x: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: A = None
        self.x: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: A = None
        self.u: B = None
        self.q: B = None
        self.v: C = None
        self.x: C = None
        self.txt = txt

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

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