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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: D = None
        self.t: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: D = None
        self.y: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: E = None
        self.u: E = None
        self.o: C = None
        self.p: A = None
        self.r: F = None
        self.y: E = None
        self.txt = txt

g = A("g")
l = B("l")
k = C("k")
i = D("i")
a = E("a")
b = F("b")
f = G("f")
m = B("m")
j = E("j")

g.v = l
g.s = f
l.s = m
l.y = b
l.v = j
k.y = f
k.r = i
k.t = l
i.t = f
i.r = a
i.p = g
i.w = b
a.z = j
a.q = i
a.y = k
b.w = g
b.y = g
f.t = b
f.r = b
f.v = a
f.u = a
f.o = k
f.p = g
f.y = j
m.s = l
m.y = b
m.v = a
j.z = a
j.q = i
j.y = k
assert a.y.r.p.v.s.y.w.s.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: D = None
        self.t: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: D = None
        self.y: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: E = None
        self.u: E = None
        self.o: C = None
        self.p: A = None
        self.r: F = None
        self.y: E = None
        self.txt = txt

g = A("g")
l = B("l")
k = C("k")
i = D("i")
a = E("a")
b = F("b")
f = G("f")
m = B("m")
j = E("j")

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